How to click specific links in web app?

studio
datascraping
web

#1

Hello

I am currently working on the automation of a process where I have to enter a website, see the status of a documentation and if the status of it is: “Pendiente” I must click on the word “Presentar” and make a series of actions. But in a month there may be 1, 2 or 3 documents with status "Pending"
How to make the robot interact / enter in each of the “Pending” states.
Attached an example in which you should click on “Presentar(submit)” to enter the required window, but as I recently commented, in a single month the word “Submit” may appear more than once


#2

Hi,

I can make some suggestions if that helps.

  • Use “Extract Structured Data” activity to create a datatable
  • Use a “ForEach row” to loop through each line item
  • Inside the loop, increment a counter to count each row to use later in the selector, like rowCt=rowCt+1
  • Inside the loop, use an “If condition” checking the value of a column that you want to click on.
  • Inside the true side of the “If condition”, use a Click activity on the button, but change the Selector string in the parameters so use the row counter variable inplace of the number that shows up in the selector that represents the row of the table on the site (you might need to use UiExplorer to get the selector that includes the tableRow attribute)

So, in summary, 1. Get table, 2. Loop through table, 3. Click the button that corresponds to the Table Row that meets your criteria.

Regards.


#3

Hi ClaytonM,
I got the same situation here where I need to click a link based on the ‘year’ value supplied by user.
I got sample links like:
Good Year 2014
Good Year 2015
Good Year 2016
Good Year 2017
SO, what I did is:

  1. Used Extract Structured Data.
  2. Use for each loop to loop through each row
  3. Check if a row contains the ‘year’ value supplied by user.
    If yes,
  4. Used Click text activity to click a link
    But when I try to attach live element in selector, it says ‘Could not attach to live element’. Do you have a solution for this please. Thanks

#4

Hi @suwalruchan365
Do you have the selector of one of the links? What you can do is place the year inside the selector as a variable, so you don’t even need to run it through a For each at all.

Let’s assume the year is stored in a variable called yearProcess
Then, if you go to the Selector property and click inside the text box it will show the selector as a string, so you can edit the string to include the variable (and there are examples of this throughout this forum)

An example Selector string might look like this:
"< aaname='Good Year ‘"+yearProcess+"’ tag=‘a’ />"

Then, it will click the link that contains that attribute, so no need to loop through entire table. Of course, it will also depend on what part has the link, because if the text is not contained in the link then you can use Get Attribute to get the tableRow attribute of the row that contains the text "Good Year "+yearProcess, then use that tableRow in the selector of the link.

I hope this helps.

Regards.


#5

HI , I need to click a link from a table. After a filter i have only one record now and i need to click a link form the row. say “10003” is a link from the row. Can you please help me to achieve this.