Skip to main content

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

 

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


@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.


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


@chingyuyang

Did my solution worked for you?


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...


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:

//formr@name='SWEForm5_0']/spana1]/divi1]/divi3]/divi1]/divi1]/divi3]/divi3]/divi1]/divi2]/tablel$variable.Number:toString$]

 

 

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

 

Cheers

Marc


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!


Hi ​@chingyuyang,

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

 

Cheers

Marc


Reply