What are error handling and recovery scenario, how did you implement in your project?
related to an answer for: Can you explain workflow?

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

answered by (171 points)
0 votes
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.