Click hyperlink from the table data

Hi All,
I have a table of data in the website and want to click the hyperlink by searching the Series Name and click the link. But clicking the hyperlink is dynamic, which means the row position changes.

SeriesName SeriesLink

ABC Link1
BCG Link2

Hi

  1. Open Browser // Navigate to the website

  2. Data Scraping // Extract the table data and store it in a variable (e.g., ExtractedTableData)

  3. For Each Row // Iterate through the table data
    Input: ExtractedTableData

    1. If // Check if the Series Name matches
      Condition: row(“Series Name”).ToString = “Your Series Name”

      1. Click // Perform the click action on the dynamic hyperlink
        In the website click on the hyperlink cell and change the selector of tablerow and initialize a number to 1 and increment after every iteration

I hope this will help you,

Thank you

<webctrl id='mainFrame' tag='FRAME' /> <webctrl class='tableborder' tag='TABLE' /> <webctrl tableRow='**7**' tag='U' />

This is the strict selector and want to change the tableRow number. But if I do, selector failed to validate.

Hi

By using get attribute value you find the unique elements
or If it does not work try to change other attributes like aaname

I hope this will help you

thank you

Hi @premkumar.rengarajan

Please share the strict selector without changes for reference.

And it would be better to consider the “aaname” if you have a particular series name.

Thank you.

I cant use “aaname”, because the link is not unique. See the table format, series ABC and GCF are having same seriesLink, here I want to click GCF link - Link1. Combination of SeriesName and SeriesLink will give unique row. I tried to extract the below table in datatable format and iterated each row and got the row number which I am expecting. But don’t know how to click the link( href is set to javascript:reqid(1234)). Click event not triggered for this href.

SeriesName || SeriesLink

ABC || Link1
BCG || Link2
GCF || Link1

@premkumar.rengarajan

In click activity take “SeriesName” as “Strict selector” anchor and then use “aaname” to give dynamic values.

Sometime seriesName also repeat twice like this.

SeriesName || SeriesLink
ABC || Link1
BCG || Link2
GCF || Link1
GCF || Link2

@premkumar.rengarajan

So are you getting TableRow as “7” like this in the selector?

Yes, I want to change that number and click that element.

@premkumar.rengarajan

Initialize the variable outside the for loop as integer and assign the value as 1(give the value in which the tablerow attribute of first row holds).
For each iteration increase the value by 1.
Give that variable in the TableRow attribute.

we can handle by a dynamized selector along with an integrated anchor

Thanks for the reference, but still it not solved my problem.

In the table, I want to find my series name. If any duplicate series name, then check for seriesLink and click that link.

we can combine. But the case looks also to

  • group the data for the duplication identification
  • use row index for anchoring the link click

Thanks for your reference, but still can’t make a solution for my problem.

I attached the screenshot of my actual website and what I am trying to achieve in the page.

For datatable, I am finding the “Series Type” text and assigned the below table to datatable, after that iterated to each row in the table to get the “POI” Name and want to click Series1, Series2 and Series3 next to next.


Pls suggest or examples to click it dynamically.

https://docs.uipath.com/studio/standalone/2023.4/user-guide/dynamic-selectors

This link helped me to resolve my issue.

Thank you once again for your help.

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