Hello, I am trying to find an efficient way to see if one of many possible elements exists on a webpage.
I have a while loop that checks to see if one of 5 elements exists. If none exist, the page refreshes. If one of the elements exist, a message box will pop up.
Currently I have nested if statements which looks very messy and will be hard to manage.
Is there a better way to achieve this?
Thanks, if I’m not mistaken isn’t this activity used if you want one of multiple outcomes? In this case I just want to use one variable, end the while loop and show the message if element exists is true.
If none of those are found, the page should refresh and check again.
If I can achieve this with Pick Branch can you tell me how?
Thank you, I tried this a few minutes ago. It looks like even if one of the elements exists, because the others don’t exist the boolean will always return false.
EDIT:
oh wait sorry, I didn’t see the screenshot. I’ll try again.