Created
October 17, 2018 11:50
-
-
Save seleniumgists/e0424dfb01d5a8d9cd16f0ca6c0d144a 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
default void setInputText(Supplier<By> by, Object value) { | |
if (value == null) return; | |
Element element = await(by); | |
await((Predicate<SearchScope>) searchScope -> { | |
element.clear(); | |
return element.getValue().isEmpty(); | |
}); | |
String stringValue = value.toString(); | |
element.sendKeys(stringValue); | |
assert stringValue.equals(element.getValue()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment