Home > front end >  how to enter text in Name field if its value Keep changing after each refresh?
how to enter text in Name field if its value Keep changing after each refresh?

Time:05-10

I am relatively new to Java and Selenium. URL : https://register.rediff.com/register/register.php?FormName=user_details I want to send keys into the name field. when I am trying to find the element by name tag I am unable do so because name attributes value changed each time.

`<input type="text" onblur="fieldTrack(this);" name="name86b72791" value="" style="width:185px;" maxlength="61">`

CodePudding user response:

Well You can select this using relative xpath //input[starts-with(@name,'name')]

Here starts-with only checks whether the name attribute starts-with name and ignore other randomly generated kinds of stuff.

  • Related