Skip to main content
Question

How to click on buttons one by one in browser?


Forum|alt.badge.img+1

Hello,

I’m using AA community edition to create a bot to search and download documents in a browser.

I’ve  done most of the actions I need but I stuck on not knowing how to click the document button one by one in a loop.

The website is as follows, I need to click on those blue magnifier buttons on the right in order to download documents.

I’ve tried to record different buttons and found object properties “path” changes.

1|-1|-3|2|-1|1|-2|1|1

1|-1|-3|2|-1|2|-2|1|1

However the bot still fails to click on buttons one by one automatically in the loop.

 

If there’s a way to accomplish this task kindly let me know. Big thanks in advance!

 

Website url: https://domestic.judicial.gov.tw/judbp/wkw/WHD9HN01.htm

 

8 replies

Marc Mueller
Pathfinder Advocate | Tier 6
Forum|alt.badge.img+14
  • Pathfinder Advocate | Tier 6
  • 167 replies
  • March 18, 2025

Hi ​@chingyuyang,

Try to use the DOMXPath only and use “Select item by Index” (as your screenshot shows a dropdown menu) and on the “Loop” action assign a number variable which can use in here.

 

Or is it always “Category 2” ?

 

Example with a DropDown menu:

 

Cheers

Marc


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • 3 replies
  • March 18, 2025

@Marc Mueller Thank you for the reply. 

 

Sorry for the misleading.

The problem I’m trying to solve is with the first picture: how to click those blue magnifier buttons one by one.

The second picture is just a sample of how to search and get the list of first picture.


Marc Mueller
Pathfinder Advocate | Tier 6
Forum|alt.badge.img+14
  • Pathfinder Advocate | Tier 6
  • 167 replies
  • March 18, 2025

Hi ​@chingyuyang,

Or you can use this in your path property: 1|-1|-3|2|-1|$SampleNumber.Number:toString$|-2|1|1

The variable SampleNumber needs to be incremented with the loop if necessary.

 

Capture action for magnifier button in “Loop”:

Cheers

Marc


Marc Mueller
Pathfinder Advocate | Tier 6
Forum|alt.badge.img+14
  • Pathfinder Advocate | Tier 6
  • 167 replies
  • March 18, 2025

@chingyuyang

Did my solution worked for you?


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • 3 replies
  • March 18, 2025

Hi ​@Marc Mueller 

Thank you for the prompt reply and apologizes that I was caught up by meetings.

 

I tried to add number variable in the path property in recorder capture action and use a number increment action in the bot but that didn’t work out.

Also I tried to delete the path property and the clicks still works, it just click the first button as I recorded repeatedly instead of clicking the next button in order.

I checked other object properties and only path properties changes when I record different buttons. However no matter what I set in the path properties the bot just not working...


Marc Mueller
Pathfinder Advocate | Tier 6
Forum|alt.badge.img+14
  • Pathfinder Advocate | Tier 6
  • 167 replies
  • March 18, 2025

Can you try to switch to the DOMXPath only in your LOOP?

Capture the first two ones and compare the difference between them in the DOMXPath.

Just use the DOMXPath in your capture action within your Loop with the correct Number:toString in DOMXPath as variable.

 

ONLY select the DOMXPath and replace the number in where is the difference in your DOMXPath with the variable.Number:toString like:

//form[@name='SWEForm5_0']/span[1]/div[1]/div[3]/div[1]/div[1]/div[3]/div[3]/div[1]/div[2]/table[$variable.Number:toString$]

 

 

To check the DOMXPath you can see my video below (JavaScript part):

 

Cheers

Marc


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • 3 replies
  • March 19, 2025

Hi ​@Marc Mueller ,

I tried to use DOMXPath, however, the properties didn't change.

 

I solve the problem now by changing the type of capture object.

After I use “Microsoft UI Automation(COM)” and add the number variable into “path” properties, I can successfully click the magnifier buttons one by one automatically!😍

 

Thanks for all the help!


Marc Mueller
Pathfinder Advocate | Tier 6
Forum|alt.badge.img+14
  • Pathfinder Advocate | Tier 6
  • 167 replies
  • March 19, 2025

Hi ​@chingyuyang,

glad that my answer partially help you solving the problem!😊

 

Cheers

Marc


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings