Forum Discussion

Jakemorley's avatar
Jakemorley
Champion Level 0
6 years ago
Solved

If ... then else statements

Hi All,   anyone who can help me?   im hoping its simple but im new to smartbear ( and automation testing) so suggestions are much welcomed.   all i am wanting to do is to run either a If...
  • shankar_r's avatar
    shankar_r
    6 years ago

    You can use For Loop to n  times you wanted to click.

     

     

    When you're done with adding above dialog create button click action put it in Foor Loop then you are all set.

     

    You will see a screen like below (Instead Log you will button lick)

     

  • tristaanogre's avatar
    tristaanogre
    6 years ago

    To expand on shankar_r's answer... the for loop is what you would do for repeatedly clicking on the button.  Each time through the loop, click the button.  Then use an "if-object" operation to check to see if the popup exists.  If it does, if this was script code, I'd call a "break" in the for-loop.  However, since it is not script code, break is not available so I would set the index of the for-loop to be equal to the upper range so that the loop would exit.