Hi Team,
i have 3 pages login,environmenr,Home page now whenver i want to start my flow i want to check these 3 pages at a time how can we do?
if i want to check appstate sequence its take so much time
if you want to check the existence of these three pages (login, environment, home page) before starting your automation flow, you can use activities like “Element Exists” or “Image Exists” to verify if specific elements or images are present on the screen. Here’s a general workflow:
1.Use the “Element Exists” or “Image Exists” activity for each of the three pages.
2.Configure these activities to check for specific elements or images that are unique to each page. If the elements or images are found, the activities will return either “True” or the element’s details.
3.Use “Flow Decision” activities to check the results of the “Element Exists” or “Image Exists” activities for each page. Based on the outcomes, you can decide how to proceed with your automation flow.
4.If all three checks are successful (i.e., all three pages are detected), you can continue with your automation flow
If only one of the pages can be open at the same time, you have a couple of options.
a) Check for all of them at once using Pick & Pick Branches.
b) Check for them sequentially, but use timeout only in first activity. The first timeout acts as a delay for the other Check App State activities and their timeout can be set to 0.
@hm00776818 I encounter situations like this and I use a Try Catch with a Parallel activity inside the Try section like this:
Notice each of them have a Check App State activity inside. When the intended element appears on any of the windows, Throw a BusinessRuleException
with a distinct message.
In the Catches section, I add a Catch for BusinessRuleExceptiion
and add a Switch for the BusinessRuleException.Message
:
This allows me to detect fast even when I’m checking for 3 pages at the same time. As soon as one page is found, it disregards the other pages and moves on the the next intended steps
Let me know if this works for you or if you need more help.