2 Element Exists at the same time?

Hi Everyone. I got a question for you.
It’s possible that two element exists run at the same time?
For example, I want to know if a webpage show an Active button or an Inactive button and, depending on which element you find, execute a sequence of actions.
The question is to avoid waiting for a button to be found if it is not going to exist

1 Like

Yep. If two similar elements exists, then they will get into an element array.

If you want to run your logic based on which button is available, you have to look for both elements, and then change the logic based on which one the robot finds.

Here is something similar:

1 Like

I think here parallel activity can help you. You can use element exists on both the buttons and based on the button it appears corresponding workflow will be executed.

1 Like

Explore the Pick Branch activity. It might be just what you need. It looks at both element exists, then will perform the tasks on the one which becomes true.

3 Likes

Thanks @ClaytonM, @AndyMenon and @ISRIRAM for the feedback!
I’m using the PickBranch Activity! It works Perfectly!

thanks to everyone!!!

1 Like

Hi @ClaytonM here parallel branch activity also satisfies our requirement right? If not can you please explain the difference between parallel branch and pick up activities

Hi @ISRIRAM

Parallel works equivalently if you surround each side by an IF so it won’t be performed if the element does not exist. However, if both Element Exists are true (for whatever reason), both sides are performed. Also, each activity in the parallel will be performed in order from left to right (not at the same exact time).

A Pick Branch will only perform the side which is true, and if both are true, I believe it only does the first side. So, it’s only going to perform one side.I suppose it’s similar to a Switch but in a different format.

Hope that explains the difference on why you wouldn’t want to use a Parallel in this case.

Regards.

Hi @ClaytonM Thank you for the reply

Based on my understanding we use parallel activity to execute more than 1 sequence one by one starting from left to right based on the true conditions.
And use pick branch to execute only 1 action sequence on which the corresponding condition become true.
Please let me know if my understanding is right.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.