Home > OS >  Finding XPATH in c# selenium
Finding XPATH in c# selenium

Time:11-04

I couldnt find this element by xpath. I need help about it. I m using c# selenium. İts twitter login email vertification modal window. Im trying to send an email to this input.

<input  autocapitalize="none" autocomplete="on" autocorrect="off"
inputmode="text" name="text" spellcheck="false" type="text" dir="auto" value="">

CodePudding user response:

You can use below xPath's to find the element.

xPath with inputmode:

//input[@inputmode='text']

xPath with name:

//input[@name='text']

xPath with type:

//input[@type='text']

Always check your xPath in chrome console to make sure it is unique.

  • Press F12 in Chrome.
  • Go to elements section
  • Search ( CTRL F)
  • Place the xpath and see, if your desired element is getting highlighted with 1/1 matching node. This means, your xPath is unique.
  • Related