Created
June 13, 2019 21:41
-
-
Save seleniumgists/4cf438ba7386e2b4ecb556d731156f18 to your computer and use it in GitHub Desktop.
generated automatically from #selenium on seleniumhq slack
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
public static ExpectedCondition<Boolean> dropDownToFinishExpanding(WebElementFacade element) { | |
return new ExpectedCondition<Boolean>() { | |
@Override | |
public Boolean apply(WebDriver webDriver) { | |
element.waitUntilVisible(); | |
int heightBefore = element.getSize().getHeight(); | |
sleep(50); | |
int heightAfter = element.getSize().getHeight(); | |
return (heightBefore == heightAfter && heightAfter > 0); | |
} | |
@Override | |
public String toString() { | |
return "Dropdown to expand"; | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment