Skip to content

Instantly share code, notes, and snippets.

@willryan
Created October 11, 2012 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willryan/3873702 to your computer and use it in GitHub Desktop.
Save willryan/3873702 to your computer and use it in GitHub Desktop.
displayed helper for Geb tests
class BasePage extends Page {
// use inside content definitions to prevent wait success until the element is displayed
static displayed(elem) {
(elem?.displayed) ? elem : null
}
}
@dexterous
Copy link

You can reduce the condition to elem?.displayed.

@dexterous
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment