How to make a transition between activities

Hello, as shown in the screenshots, I have activity check app state, which allows me to click the button, but it does work, but I have four activities because there can be from one to four buttons on the page that download the file. And my question is how to make it so that after such one activity, if there is only one button to click, he moves on and does not click the same button four times. Any IF?


Hi @Szymon_Turcza

  • Initialize Boolean variable: buttonClicked = False

  • Check App State for Button 1

    • If found:
      • Click Button 1
      • Assign: buttonClicked = True
    • If not found:
      • Continue
  • If (buttonClicked is False)

    • Check App State for Button 2
      • If found:
        • Click Button 2
        • Assign: buttonClicked = True
      • If not found:
        • Continue
  • If (buttonClicked is False)

    • Check App State for Button 3
      • If found:
        • Click Button 3
        • Assign: buttonClicked = True
      • If not found:
        • Continue
  • If (buttonClicked is False)

    • Check App State for Button 4
      • If found:
        • Click Button 4
        • Assign: buttonClicked = True
      • If not found:
        • Continue
  • Proceed with the rest of the workflow

This way, after a button is clicked and buttonClicked is set to True , the subsequent checks for the other buttons will be skipped. Remember that the “Continue” activity should be placed inside a loop (e.g., “Do While”, “For Each”) to work correctly. If you’re not in a loop, you can use a series of “If” activities instead to manage the workflow.