Identify element where position varies

Hi.

I need to be able to click on an element on a web page which is part of a table row, but it varies dependent on the number of rows in the table.

For example, the element i need to click on is the 50 button in the screenshots below
In the first screenshot the Selector will be
webctrl id=‘UserListTableItemsOnPageHi’ tableRow=‘7’ tag=‘A’ /

and in the second it will be
webctrl id=‘UserListTableItemsOnPageHi’ tableRow=‘12’ tag=‘A’ /

Is there a way to identify the rows in the table and pass that value back to the Selector, or is there another methodology I can use.

Thanks

1 Like

HI @gary.cobden ,

you can use ‘Click Text’ Activity if you know aaname of the table

Thanks

Hi @gary.cobden,
you can try first to extract all data table then in DT for loop use the needed string value in aname selector it will work with you if this is not clear please update us and if this is public web page and available to be shared share link with us for more effective help :slight_smile:

I have managed to extract the number of rows in the datatable, but how do I pass that value back to the Selector for the value of TableRow

webctrl id=‘UserListTableItemsOnPageHi’ tableRow=‘7’ tag=‘A’ /

It will work if the table in structured format also you can use idx and i recommend to use aname in selector and it will be better and more accurate

Forget about the row number. Just identify the element with a selector that takes into account its unique properties besides table row.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.