Ask a Selenium Expert: How to Handle Exceptions

Posted May 29th, 2014

selenium testing & sauce

This is the final follow-up question in a series of 8 from Selenium expert 

During our recent webinar, “Selenium Bootcamp,” Dave discussed  how to build out a well factored, maintainable, resilient, and parallelized suite of tests that run locally, on a Continuous Integration system, and in the cloud. 

8. What's the best way to handle StaleElementReferenceExceptions? Is this ok just to squelch them?

Yes, for the most part, it's okay to rescue these exceptions. You can see an approach on how to do that here.

That wraps up our follow-up session from Dave Haeffner! Get more info on Selenium with Dave’s book, The Selenium Guidebook, or follow him on Twitter or Github.

Written by

Bill McGee