Forum Discussion
Hi diwakar_sh12 ,
I am not that proficient with python, but you might want to put the try/except block inside of the while loop, that way it can continue with the next entry if an error is raised. I'm not certain of the exact syntax/format, but something like this might work:
while not ddv.EOF
aqTestCase.Begin("Test Case" + ddv.Value[0]);
try:
openApp()
clickObject(contactUs)
waitTillPageLoads()
fillContactForm(ddv)
except:
Log.Error("Error Occured")
closeBrowser(Project.Variables.browser)
aqTestCase.End()
ddv.Next()
I hope this helps.
Hi Chris,
Thanks for looking into this issue. Actually, I've already tried that approach however no luck. What is happening here, if there are 10 objects on a page, and an error occurred at the second object then the script marks the step as a failure but at the same time it continues to perform the action on other objects on the page, it should skip that iteration completely and pick another in a loop.
If you have any other solution to achieve this please let me know, I'll tweak my code accordingly.
Related Content
- 4 years ago
- 6 months ago
- 3 years ago
- 3 years ago
Recent Discussions
- 2 days ago