Wait until animation is finished with WebDriver and Geb
If you have a jquery animation like slideDown and want to make sure it is finished in your Selenium/WebDriver/Geb test, try the following:
waitFor {
!js.exec('return jQuery("#id_of_my_element").is(":animated");')
}
This will wait until animation od #id_of_my_element is finished. What makes it possible is jQuery's :animated selector.
Of course, you can replace #id_of_my_element with any jQuery selector you need.
Written by Krzysztof Jelski
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Selenium
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#