How do I find this WebElement by xpath?



  • I need to find the following WebElement using an xPath.

    <input type="hidden" name="hiddensearch" value="110909" id="searchhidden">
    

    The Value is changing dynamically, e.g.

    • 109899
    • 111910
    • 104274
    • 102475


  • dont match the value, match the element that contains the value by ID.

    e.g. in the following html

    <element id="matchthis">value</element> 
    

    match 'matchthis' not 'value' .

    then read the value from the element and check it has the value or values you expect it to have.


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2