Page 1 of 1

How to handle Dynamically changing table index

Posted: Wed May 08, 2019 9:17 am
by chiranthurs
Hi Team,

I am facing an issue in xpath where the table index keeps changing on every run due to which my script fails. I wanted to know how i can handle this table index .

As Highlighed in the screen shot, on every test run the "table[3]" can be "table[2]" or even "table[1]" next time. Not sure how i can handle this dynamic ally changing table index. Please help.

Re: How to handle Dynamically changing table index

Posted: Wed May 08, 2019 10:31 am
by odklizec
Hi,

Could you please upload a Ranorex snapshot (NOT screenshot) of the table in question?

Have you simply tried to remove the index from xpath? If the xpath is not unique without index, then you will have to add a reference to another element, from which you can traverse to the table you want. For example, label “List of releasable positions” looks ideal? Eventually, you can use directly one of table’s headers? But without seeing snapshot, it’s hard to be more detailed.