Dynamic variables in the selectors

Hi folks,
I have a question: can we read a dynamic part of selector number, convert it to Int32 and use it as a variable in a loop?

For example: after a search, web page returned a list of jobs (can be from 0 till 1000), I need to click on each (one by one), here is example of first selector:

the second one is:

next is:
<webctrl aria-role=‘link’ id=‘promptOption-gwt-uid-231’…
and so on:
That mean only part of id attribute increase +2 for each element. 227+2= 229+2= 231+2= …

Q-1: How to get that id in a output string var?
Q-2: How to cut from whole id only last char for number, plus that number can be between 10-999 :frowning:
In the XPath we may use Index method
like:
(//div[@class=“gwt-Label WO5O WH4O”])[n] n-variable for loop…, but here looks like so complicated.

Maybe IDK some activities, with can help as click on each element after search?

I found solution, of course we have an activities: For each UI element.

You can use get attribute activity and use substring or split to achieve that.

1 Like

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