public static class PageHelper.Form extends Object
Constructor and Description |
---|
Form() |
Modifier and Type | Method and Description |
---|---|
static void |
enterText(String text,
org.openqa.selenium.WebElement textField)
Wrapper for
WebElement.clear() and
WebElement.sendKeys(CharSequence...) |
static void |
enterTextLoop(String text,
org.openqa.selenium.WebElement textField)
Enter the text with
WebElement.sendKeys(CharSequence...) and loop
(max 50 attempts) until the text is found to have been actually fully entered. |
public static void enterTextLoop(String text, org.openqa.selenium.WebElement textField)
WebElement.sendKeys(CharSequence...)
and loop
(max 50 attempts) until the text is found to have been actually fully entered.
Needed when for some reason (maybe some JS making WebDriver lose focus from the field)
WebElement.sendKeys(CharSequence...)
does not do its job and does not send all the
characters it was asked to.text
- the text to enter in the text fieldtextField
- a text fieldorg.openqa.selenium.WebDriverException
- after 50 unsuccessful loopspublic static void enterText(String text, org.openqa.selenium.WebElement textField)
WebElement.clear()
and
WebElement.sendKeys(CharSequence...)
text
- textField
- Copyright © 2015. All rights reserved.