Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
217 views
in Framework-FAQ by The go-to Tester (181 points)
edited by
What are error handling and recovery scenario, how did you implement in your project?
related to an answer for: Can you explain workflow?

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
Most of the time we get element not found exception/errors, we use Try catch block and first try to use WebDriverWait class to make webdriver wait for element to be visible for certain amount of time. If WebDriver fails to detect element in specified amount of time, lets say 10 sec, we put that into catch block and call same function again, where webdriver will wait for the element. We do such 10 iterations and if elment is not found, we implemented another method to identify in catch block. Lets say first we were identifying using CSS selector when CSS did not work, we used xpath.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...