Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

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">`

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading