Working on an Automation which has a box called ‘more’ and I want to keep on clicking this box until it disappears.
First method I have is to create a variable called ‘counter’ and then have a Do While iteraring the ‘click command’ a specified number of times.
However I wish to make it more dynamic and so I’ve done the following:
1: Element Exists on the ‘more’ button
2: Within a Do While, I’ve added a click activity on the more button
3: Specified condition as ‘booMultiples’
Inside the loop initiate again the boolean like this
with assign activity as a first activity to ensure that condition is retained for each loop
bool_exists = False
Another assign activity like this
bool_button = False
Then inside the loop use a ELEMENT EXISTS activity next to the above two assign activities and indicate the element u want to keep clicking and get the output as a boolean variable named bool_button
Use a if activity and mention condition as
bool_button = True
If true it goes to then block where use a click activity to click it
If false it goes to else block where leave it empty
Obviously it would be true and loop continues
If it becomes vanish then click also won’t fail and moves to next activity of while loop
Sorry about this guys, but my original method was flawed in that I wasn’t using the correct variable for element exists.
Unfortunately I will need to still use the counter method though, as the webpage im dealing with things the ‘show more’ button is there, even when it isn’t.