I have a set of product reviews in a web page. After a set of reviews, i need to keep clicking ‘more reviews’ button to continue reading reviews. I need to automate the ‘more reviews’ button click.Is there a solution?
@Gopalakrishnan_K Use While or Do While activity
You can do something like below
Let me know if it helps
There are actually two scenarios on this
—if it’s a same single button then we can use CLICK activity itself within a RETRY SCOPE a where in the do part we can use click activity and in condition part use ELEMENT EXISTS activity so that it will keep clicking until the element vanishes
—second one is if it’s same but multiple button that is if there are more than one “more reviews” button on the UI, then we need to increment the index because that element being repeated will have some index (still we need to check with selector) in its selector, which can be replaced with a variable and incremented within a WHILE loop so that until all such button is clicked the loop will keep executing
I think button ‘more review’ is chosen with respect to the position and so ‘Cannot find element’ exception shows after an iteration.How to retrieve text alone and check if element exists?
Initially few entries will be listed .After clicking ‘more reviews’ button, 5 more entries will be listed followed by the same button.This will continue till the end of the list. Will ‘click text’ and ‘element exist’ work here?
Oh, which means your
more review button selector is kept changing with each click? then can you try using
click text activity with ‘more review’ as the text name and use the logic I explained above?
Also If you used a normal click then try to check the selector generated with each click and compare the selectors and try to make it dynamic?
Also if it is a website and accessible to everybody then please share the link with us, maybe we can get more ideas?
Yah it would of course
but i would recommend to go for CLICK activity rather CLICK TEXT, as there is a chance of exception and is more when compared to click activity
In click activity select the element and make sure that the attribute which looks dynamic is handled with wildcard symbol and thus enabling it to access the button on different pages or instances
It would be great if i can see the UI with a screen shot on how it actually looks so that we can get through the right and precise direction
Hi @Vishal_K and @Palaniyappan ,
Here is my link. Please check the rating page.
This is what you needed @Gopalakrishnan_K
Please open the website and run this xaml file
Main.xaml (8.6 KB)
Note: I have used Chrome browser and tested. If you are using explorer then just
indicate screen for
element exists and click activity on
Show more review
This file contains unresolved activities.
Can you take a screen shot of these activities and send?
Don’t know why it appears as such
here you go the screen shot
The selector for both element exist and click activities are
<html app='chrome.exe' title='Dr. Jeannette Musset, NMD | Scottsdale, AZ | Healthgrades' /><webctrl aaname='Show more reviews' parentid='premium-review-section' tag='A' />
How and where can selector be added ?
Click on the activity (element exist and click) and in the property panel you can add the selector. Please find the below screenshot
Note: You just use Indicate On screen and indicate “show more reviews”, it will auto add the selector
If i am using firefox ,IE or edge ,what i should give instead of chrome.exe?
Open your IE then use indicate on screen button as show in this screen and click on the
show more review it will automatically take the selector of the browser.
As of now in your case use the followin selector for IE
<html title='Dr. Jeannette Musset, NMD | Scottsdale, AZ | Healthgrades' /><webctrl aaname='Show more reviews' parentid='premium-review-section' tag='A' />
Note: Please go through the UIpath selector tutorial for more
it worked well. Thank you for your time. Please go through another problem and give the solution.
in which the solution isn’t appropriate enough.
Oh great congrats! it worked, mark this as solution then
Let me check your other post then.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.