perform Validation in loop

Best practices, code snippets for common functionality, examples, and guidelines.
Patil
Posts: 6
Joined: Mon Dec 26, 2022 12:29 pm

perform Validation in loop

Post by Patil » Tue Dec 27, 2022 10:56 am

Hi,
The scenario is- if the 'Next' button is 'enabled=True' then mouse click on that button should be performed. Again, if the 'Next' button is 'enabled=True', mouse click performed. Here, the number of pages is not fixed & need to open each page. So, need to perform validation in loop. When it became 'enabled=False', then simply log statement "Action completed" instead failing the test.
How to achieve this?
As of now, I've created separate smart folder & executing recording module in Iterations with configured Error behavior. eg. if 20 pages appears & iteration count is 50, then till 20- it works fine. at 21, it fails & skips all further iterations- executes next smart folder. In end report, that testcase fails.
Please provide better solution in detail.

Thanks,
You do not have the required permissions to view the files attached to this post.