Hi, I will like the bot to click on different names on a web page but got stuck when it clicked only one, I need it click on
hi @RPA-botDev,
- Start by analyzing the selectors for the names from Ui Explorer
- Click on first name - save the selector in notepad.
- Click on Second Name - save the selector in notepad
- click on Third Name - Save the selector in notepad.
- compare the above three selectors and try to find what is different in them and dynamic , If there is a index which keeps incrementing … 1 then 2 then 3…this will be used to create dynamic selector
- Take a foreach loop and inside it - Have a click with dynamic selector.
–
Mukesh
Hi @mukeshkala, I was able to get the dynamic selector but the challenge is how to place foreach activity for the names on the browser since we are to click on it. Any clue
hi @RPA-botDev,
Below is a sample where I am Clicking Different items of UIForum.
Eg :
1.Below are the 2 selectors for 2 different items that I need to Click
-
Now If you will analyse the both - we see that The only Thing changing is TableRow Value - first 2 and then 3 and then so on…
-
So I Begin by creating a Array of Integer Holding the Dymanic values as shown below and a String Variable to Hold the Dynamic Selector
- Now we take a foreach on the array and create the dynamci selector as shown below . Notice here that the TableRow Variable is now Dynamic and Coming from the IntArray we Defined. Now what happens here is - First a Selector will be created for TableRow 2 and then TableRow 3
- Next Step would be Attaching the Browser and clicking on the Selector. Now if you will Notice - The selector for the click is the variable we defined above dynamically .
This way - First it clicks on the TableRow 2 AND then TableRow 3 .
- Point to remember here is that - once we click on TableRow 2 - the page will navigate - we have to come back to intial page - we can use the Go Back Activity of the Browser.
–
Mukesh
Thanks @mukeshkala
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.