Hello, I need to automate clicking through a series of links in a web application. In the picture I’ve attached below, there are four links on the right column under “Name” that I need to click and then perform a series of actions in each of the pop up windows that they give.
Additionally, I can’t hard code the sequence to just open these exact four links, as in the future we may have more added that I would want the sequence to recognize without having to alter it.
It looks like I can only use For-Each loops to iterate through tables and data structures. Is there a method to iterate through elements of a UI instead?
- Just click on the first link in the browser and save the selector
- Click on second link and check the selector.
- There will be an increment in the selector when you compare those two. so, you need to pass the selector dynamically by incrementing that particular value everytime,
here is the sample
My first selector : <webctrl idx=‘2’ parentname=‘45C11FA478E745FEA08D781CEA190FE5_1’ tag=‘TABLE’ //>
Second selector : <webctrl idx=‘2’ parentname=‘45C11FA478E745FEA08D781CEA190FE5_2’ tag=‘TABLE’ //>
The only change is parent name here. so when you want to click on the second link, then simply changing the 1 to 2 will click on second link. so pass the selectors manually
Thanks, Hareesh. My tags do contain an increment, but it is only in the name of the link itself, e.g.:
webctrl aaname=‘FWB-0002’ parentid=‘BusUnitPrograms’ tag=‘A’
I could change the FWB-000# part to be dynamic, but would this work if I did not know what the numbers will be? For example, do I have to set a for-loop going from 1 to 9999 for each page? Would that even work? I want to set up the sequence so that it can scan multiple pages of these types and still click on the links, regardless of what the number was.
Thanks for your help.
UPDATE: I’ve found some sort of a workaround, but I can’t confirm that it works just quite yet. What I’ve tried to do instead is use data scraping to create a table of all the row names it can find, and then use the resulting data table to create variables for dynamic selectors. Since the size of the data table essentially gives us the number of links to click, we don’t have to worry about the number changing in the future.
The workflow currently looks like this, but I haven’t been able to get the dynamic selectors to work in the “Click” action yet. Will give another update if this gets resolved.
UPDATE 2: The above method works. Just remember to set the dynamic selector properly, the implicit addition of ‘"’ messed me up, but making sure to get rid of these by editing directly in the properties instead of using the selector editor solved the issue. I am now able to click on all the links one after the other without needing to know how many there are or what their numbers really are.
Please refer to the above workflow for the solution.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.