I have a webpage contains 10 links which have the same name called ‘Details’. I have to click on each ‘Details’ to retrieve the info and then to click GO BACK button to return to the webpage. Also, In a webpage, I can retrieve only 10 Details, but I have several pages. In each page, I have to perform the same.
Note: I tried with data scrapping, but the URL for ‘Details’ retrieves # symbol. I also tried with '‘Get attribute’ activity, but it retrieves the same URL for all the ‘Details’.
Kindly someone help me on this, as I am working on a project to prove Uipath automation can make big changes to the industry am working on.
Also, When I try to view the page source, I found that it is a javascript program. Please see below for the code snippet for the ‘Details link’
< a href=‘#’ onclick = detailslink();>
Hope this info will help you to find a solution for my problem.
I noticed you have a tableRow attribute. What you could do is use a loop and increment rowNumber by 1 each time you click the element.
You can then edit the selector to use the variable. You need to edit it as a string by clicking inside the Selector text box in the Parameters for the activity.
"< ...... tableRow='2' />"
to "< ..... tableRow='"+rowNumber.ToString+"' />"
So, when you have rowNumber=rowNumber+1, it will add 1 to the row number and click each link until there is an error and the element doesn’t exist.
EDIT: How that collaborates with vvaidya’s ideas, I am not sure. You might be able to instead run a ForEach loop with the Children.Where( ) method if it returns a list of links you can click and ignore my previous idea.