Upon searching on a web page there are two possible outcome -
- Search Results Page Appears.
- The corresponding data page appears.
The flow need to take different routes for different outcomes above.
Currently I am using Element Exists Activity to look for one of them and then setting an if condition to divert paths. But in this case it takes time set by us to look for the element before proceeding.
Is there a way where it searches for both elements together at the same time and takes the respective path depending on what element it finds?
@Raviteja94,Use parallel activity and place multiple element exists in it
@sreekanth, In this case since only one of them will be found, won’t the other throw an error.
Element exists returns only true or false,Why will it throw an error? @Raviteja94
If I am putting 2 Element Exists in parallel activity. And Timeout is set to 30 seconds.
If my page is loading in 2-3 seconds and one of the Element Exists is becoming True, bot will still wait till 30 seconds.
Need some different logic, which will do OR of these 2 Element Exists.
i.e. If any one of Element Exists is True, robot should not use whole timeout waiting for another Element Exists
Hi You can embed “Element Exists” within if Condition
Example. For “Element 1” use Exist1 as output and for “Element 2” use Exist2 as output. Now enclose both the element within separate if condition and put the condition if Exist1 =False AND Exist2 =False.So Either of the check exist will make any one True and it will not wait for entire timeout
you can try using “Pick branch” activity for your scenario. In trigger condition you can use element exists and which ever element is present first it will perform that particular branch first.
Parallel is not a correct solution. It doesn’t do what people think it does. It doesn’t actually do two things at once.
Anyway, which of these outcomes is most likely - the results page or the data page? Whichever is more likely, check for that one first. Adjust the timeout appropriately so it doesn’t have to wait longer than necessary.