
Hi Experts, greeting from Ken !
how to execute Xpath in PAD? I want to click all "Display details" buttons on the website and below and further text extraction, however, just get a challenge that i can't based on "Selectors" to position the mouse because the Selectors for all the buttons are irregular naming but Full Xpath are in order, I listed details as below. what pop out in my mind is by executing Xpath with variables in loop, RPA can one by one to click the button to extract text. is there any existing cases or idea we can make it ? (detail as below)
the website: link
example: origin: HAIPHONG ; VN ; VNHPH
destination: VANCOUVER, BC ; CA ; CAVAN
steps: input above "origin" and "destination" - > click "Search" - > click all "Display details" buttons one by one on the page.
Thanks you in advance !
Hi.
You can use an incrementing Selector and a loop to interact with each element.
The flow:
The Selector:
Flow explained:
1. Set ActionCount variable to 0, used to determine which button to click
2. Set EndOfDetails variable to false, determines when there are no more items to expand and ends the loop when it turns true
4. Loop until EndOfDetails becomes true, which will happen when the action "Press button on web page" fails to find a button, indicating there are no more Details to expand. In the loop we increment the ActionCount variable by 1 each time which is then used in the Selector to click the next button.
You can add the variable ActionCount directly in the Selector Editor to replace the last "0" in the Id