Is there an activity likes 'CASE X WHEN condition1 THEN actA WHEN condition2 THEN actB ... end'?

The first step of my program is using IE to login on to an application system. This system will launch JAVA. While launching JAVA, it may prompt
A. a warning
OR
B. a screen for application selection.

Either A or B should load for a few seconds, and it is a random pop-up. I could not know which one would pop-up.

Now, I want to know if any activity could deal with this situation: When it prompts A, click ‘运行( R )’ . When is show B, click ‘Submit’.

Thank you!

screen A
A

screen B
B

Hi @Rale

If there are more than two possible branch on UI display, you can use Pick activity to deal with it.
Refer to the example below.

@Rale
There’s 2 solutions

  1. Use Image Exists activity (or Elements Exists activity) to check if the screen A’s displayed or not (return the result to a boolean value) - you also change the timeout to be shorter (eg. 00:00:05)
    Use If activity to check the value of boolean value
    If it’s true -> act A;
    If it’s false -> Use Image Exists activity (or Elements Exists activity) to check if the screen B’s displayed or not (return the result to a boolean value) - you also change the timeout to be shorter (eg. 00:00:05)
    If it’s true -> act B;
    If it’s false -> Unexpected case

  2. Use Pick activity with Pick Branch to check these screen parallel

For solution 1, the problem is: the warning or selection screen would be ready within 5s or more than 5s. It is unstable. :joy:

I will try solution 2.

With solution 1, you can put them into a Retry

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