Page 1 of 1

Help with an input field for XPath

PostPosted: Mon Nov 22, 2021 10:21 am
by LeslieT
Hi.

I need help in creating XPath for the input type field shown.

In this field all the ids are changing dynamically and there is nothing unique in this field.

Can you assist me with this issue?

Thanks in Advance.

Re: Help with an input field for XPath

PostPosted: Tue Nov 23, 2021 8:15 am
by eValid
LeslieT wrote:Hi.

I need help in creating XPath for the input type field shown.

In this field all the ids are changing dynamically and there is nothing unique in this field.

Can you assist me with this issue?

Thanks in Advance.


Thanks for posting your question LeslieT.

This is an uncommon problem, but there are ways around it.

The XPath (WebDriver terminology) that you're looking for is accomplished with this key command in eValid:

http://e-valid.com/Products/Documentati ... ement.html

The "trick" to use is to remember that even when the IDs in a page are changing dynamically, and even when there is nothing unique to search for in that particular ID, in almost every case there will be something unique "nearby" in the DOM structure.

Up or down an index position or two.

So, find something there and use these commands to set SourceIndex to the desired value: IndexMove number where number cand be positive or negative, whichever you need.


-- eValid Support