Clicking every instance of a button on a webpage


I have a scenario that I wonder if UIPath could help with…

There’s a site where, after doing a search it returns a list of results in an HTML table. In this table are a bunch of buttons, some of which are labeled PDF. These links go to a hardcoded link where I can download the PDF.

I need to click every instance of a “PDF” button on a specific page. How can I do this?


  1. Find Children
  2. Iterate Children items (foreach)
  3. Run Get Attribute with “aaname”
    4)If aaname=pdf
  4. Click Event with that selector (update: or you can run “get attribute” with be ‘url’ attribute (may be) to get the link to download and use Http Request activity to store in Desired location)

@abar sample for your referenceTableClick.xaml (13.4 KB)


Thank you for the skeleton! That’s helped a ton.

I copied quite a bit of this but am getting errors thrown on the Get Attribute section. I have the Element set as item but that is throwing the following error each time:

Is this an option I’m missing somewhere in the UI Studio?

Is this in for each? You need to change the type argument to UiElement

Ah ha. That helped out a ton.

Now I just need to brush on my html. The site I’m using has a table that is a fair bit more complicated than the W3 site.

How did you determine what to put in the find children box? Was that manual or did you just select the cell that you wanted?

Thank you!

The aaname?

The target selector within Find Children.

I don’t exactly remember but find children basically finds all the child ui elements for a target selector,in this case <table>

In for each loop I’m checking the aaname of the element , if it is Germany which I want to click, I’m passing that selector into a click activity.You can directly pass the element or element.selector,mutually exclusive

when I assing with .Selector.ToString, there is a message like below, could you plz tell me how to assign with method .Selector?キャプチャ

The output of Find Children is of type IEnumerable Collection of “Uipath.Core.UiElement”

You could either iterate the above collection using for each with “item” should be of type Uipath.Core.UiElement.

Or find based upon the index (if you know the specifics)

findChildren(0).Selector.ToString – intellisense may not work in this case.

Thank you for your anwser, now I solved my provlem.

:smiley: thnx