How do you iteratively click similar buttons on a page?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-01-17 08:54 AM
Hi,
To practice, I wanted to make a simple Blue Prism process that clicked each "Unfollow" button on a twitter page.
I thought I could do this by looking at the path of an element and iterating the number that identified the "Unfollow" button but I can't figure out how to do this.
For example let's say the first "Unfollow" button had the path value of "/HTML/BODY(1)/DIV(2)/DIV(1)" and the second had "/HTML/BODY(1)/DIV(2)/DIV(2)".
Is there a way to put a variable within the path and use a counter to iterate through each button? Kind of like the following psuedocode?
Counter = 1
UnfollowButtonPath = "/HTML/BODY(1)/DIV(2)/DIV({Counter})"
UnfollowButtonCount = 300
Loop UnfollowButtonCount times
{
Click UnfollowButton with Path == UnfollowButtonPath
Counter + 1
}
Or is there no way to dynamically change an element or have some kind of pattern recognition?
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-01-17 11:13 AM
This is also my question. Any way to solve these kind of issue?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-01-17 11:47 AM
In application modeller you can set the path attribute to dynamic, thus enabling you to enter ""/HTML/BODY(1)/DIV(2)/DIV("" & {Counter} & "")"" within the navigate stage you use to click the button.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-01-17 05:31 AM
Thanks joakimeklund!
After changing the element's Path to be dynamic (was not aware of this option) I was able to change the Parameter for Path in the Navigate action to change the text to be whatever I wanted and iterated through. Worked perfectly!
