Created
August 6, 2012 19:58
-
-
Save rgr2k/3277979 to your computer and use it in GitHub Desktop.
BotStyletests
This file contains hidden or 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
| * Type something into an input field. WebDriver doesn't normally clear these | |
| <rgr> * before typing, so this method does that first. It also sends a return key | |
| <rgr> * to move the focus out of the element. | |
| <rgr> */ | |
| <rgr> public void type(By locator, String text) { | |
| <rgr> WebElement element = driver.findElement(locator); | |
| <rgr> element.clear(); | |
| <rgr> element.sendKeys(text + "\n"); | |
| <rgr> } | |
| <rgr> } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment