Forum Discussion

gdave's avatar
gdave
Regular Contributor
6 years ago

Loop Test

Hi all   I intend to design a loop test where my keyword test will look at the 'Next' button on the screen and its property. If the button is disabled it will select number 2 from one of the drop...
  • dmiscannon's avatar
    dmiscannon
    6 years ago

    I'm not 100% positive, but I believe your issue is the Data-Driven Loop inside of your While loop.

     

    If you convert the keyword test to script you will see that a Data-Driven Loop translates to a While Not loop. So you have a While Not Loop inside of a While Loop. The code will not exit the While Not Loop until all data is read from the Data-Driven Loop.

     

    I recommend finding a different way to feed the different data to your keyword test

    OR

    instead of using a While Loop use an If.. Then statement to exit your Data-Driven Loop. In other words, for each iteration of the Data-Driven Loop check the Enable property and exit the loop using a Go To label if the property is set as you want.

     

    Hope that helps.