Skip to content

Instantly share code, notes, and snippets.

@robfletcher
Created December 16, 2011 14:06
Show Gist options
  • Save robfletcher/1486156 to your computer and use it in GitHub Desktop.
Save robfletcher/1486156 to your computer and use it in GitHub Desktop.
Geb module methods demonstrating how to wait for jQuery animation to complete
void next() {
nextButton.click()
waitForAnimationComplete()
}
private void waitForAnimationComplete() {
waitFor {
js.exec(this.firstElement(), "return \$(arguments[0]).find(':animated').length == 0")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment