Selenium Web Driver is a terrific tool for automating User Acceptance Testing (UAT) of your front end web layer. I don’t have a ton of experience with this form of testing, but I’ve quickly learned to appreciate its usefulness. Our team recently attempted to make a reliable set of UAT tests for a legacy application. We had a number of 3rd party social media dependencies and a less than ideal page architecture. The end goal was to have a simple test suite that was reliable enough to be automated with as few inconsistent fails as possible. As with most things, this was easier said than done; especially when done after the fact (kudos to BDD/ATDD, I’ll be employing this technique for greenfield projects).
Below is a snippet of a new WebDriverWait helper class that I’ve been using in my test suite. It includes a method called UntilAnimationIsDone. I use this after I trigger a page event that causes a series of animations so that I know the page is in the expected “ready” state and that I can continue.