cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mokshazna
Frequent Visitor

Clicking Download Option in each row in Web based table

Hey Guys,

 

I am trying to automate downloading files for each day from a website. So this website consists of a couple of files for every day. And the table consists of files from all previous days. 

 

Now what I am looking to do is to click on download option on each row in the first two rows as the recent day is on the top. For clear understanding the download label is in the first column of the table. I am stuck at how exactly we iterate through each row and click on first column label to download. 

 

Apologies that I cannot post the image because of some concerns.

 

Thanks and appreciate your help in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
tkuehara
Super User
Super User

Hi @Mokshazna 

 

If you are always clicking the same first two rows, you could try to fix an HTML tag. For example:

tkuehara_0-1626278593981.png

Your selectors would look something like this:

First data row -> tr:eq(1)

tkuehara_1-1626278913549.png

Second data row -> tr:eq(2)

tkuehara_2-1626279055463.png

Or, if you really want to actually iterate those rows, leave it dynamic:

tkuehara_3-1626279469919.png

And loop from 1 to 2:

tkuehara_4-1626279593304.png

 

View solution in original post

5 REPLIES 5
MichaelAnnis
Super User
Super User

This is going to sound stupid, but once a month I download a list similar to this.  But the table is always fixed, and the number of tabs needed never changes.  So, once I am at the page, I "Send Keys" {Tab} (27 times) to the first download button and then "Send Keys" {Enter}.  Let me know if it works for you.

Mokshazna
Frequent Visitor

First of all after spending few months doing this RPA stuff nothing means NOTHING at all sounds funny or stupid.

 

Now your solution did work, I can navigate to the cell using tabs. But the enter option at the end for download isn't working. Is there a way I can move my cursor to the highlighted cell and then send a click command?

 

I appreciate your help.

I don't see an option for that.  When you tab to the button to click, does it change the image at all?  I assume it puts a dotted line around it.  This would be distinguishable enough from the other Download buttons on the page and you should be able to use "Move Mouse to Image" to click on it. 

Soft warning on using image identification, it will typically only work on the same size and same resolution screens, so if this is something you are sharing with others who don't have the same monitor, or you are trying to use it remotely, I tend to try to avoid any image based RPA.

 

Best of luck.

tkuehara
Super User
Super User

Hi @Mokshazna 

 

If you are always clicking the same first two rows, you could try to fix an HTML tag. For example:

tkuehara_0-1626278593981.png

Your selectors would look something like this:

First data row -> tr:eq(1)

tkuehara_1-1626278913549.png

Second data row -> tr:eq(2)

tkuehara_2-1626279055463.png

Or, if you really want to actually iterate those rows, leave it dynamic:

tkuehara_3-1626279469919.png

And loop from 1 to 2:

tkuehara_4-1626279593304.png

 

Wonderful guys!!!! This was exactly I did try except for the dynamic value part. It worked like a charm. @tkuehara @MichaelAnnis  Thank you both of you. Appreciate it

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Top Solution Authors
Users online (1,589)