Created
October 11, 2012 16:38
-
-
Save willryan/3873702 to your computer and use it in GitHub Desktop.
displayed helper for Geb tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BasePage extends Page { | |
// use inside content definitions to prevent wait success until the element is displayed | |
static displayed(elem) { | |
(elem?.displayed) ? elem : null | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can reduce the condition to
elem?.displayed
.