Web Automation to Click on Select Button for each row

Hi Everyone,

I am trying to find the text on Web Page from the spreadsheet and after finding the exact title on the web page the bot needs to click on the Select button in a respective row.

Can anyone please advice how to achieve this process for each row in Spread Sheet.
Capture

Regards
Vishnu

@winningvish Are you able to extract the table on the web page as a dataTable as well?

If you are, try to loop through that table until row(“Title”) = “Provision of remote terminal…”

Hi Smith,

I have extracted as a Data Table, from that filtered the Data Table to get the New Deals.

By using the Ctrl+F, I am able to find the text on the Web Page from Row.item(“Title”).tostring

The Next job for the bot is to Click the appropriate Select button in the same row. (This is where I am stopped)

Try to look at the selector for the “Select” button. It might have some details which makes it easier to click.

If you can send a link to the webpage I can check the selectors.

You can also check the URL after you hit “Select”. This might generic and reusable.

If for example the URL is: "www.companies.com/ScottishPowerLimited
Then you could save the “invited by” as a variable. But this is not always possible.

Hi Smith,

I am not autorized to share the link appologies for that, I am sharing with you the Selector
Selector

Are you able to use the TableRow attribute?

If you count the row when you are looping through. And then set this as an variable?

The sad part about the web page is, the only hyper link available is for SELECT which is in Java Script

Would you please elaborate about Table Row attribute

webctrl id =‘ctl00_ctl00_contentHolderMainContent_contentHolderMainContent_AQ*’ tableRow=’"+tableRowCount+"’ tag=‘A’

I would loop through the dataTable until row(“Title”).contains(“Provision…”)

At first loop your rowCount would be 1. Then next one it will be 2.
So all you have to do is to make is a variable which saves the current Row Count and then you pass this into the selector.

1 Like

Seems it’s pretty good thought Smith, I will work on it and update you soon

1 Like

IdentifySelector.xaml (21.0 KB)

Have a look at this one.
I found a table on Amazon and found out that the selector for each row was either result_0 or result_1 etc.
So in order to press the correct link, I just passed the rowCount variable to the selector.

It might not run on your computer because I made a static example on a predefined site. But the logic should be reusable.

Edit: Don’t mind the activities that aren’t connected. I forgot to delete them.

1 Like

You can go for anchor based click approach, refer the beginner tutorial for more details.

image

Thank you so much Smith, your thought process really helped me and solved the problem effectively.

Regards
Vishnu

1 Like

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