use of ru.yandex.qatools.htmlelements.element.TextInput in project page-factory-2 by sbtqa.
the class HtmlStepsImpl method setFormElementValue.
public T setFormElementValue(String key, String value) {
WebElement element = getElement(key);
if (element instanceof TextInput) {
element.clear();
element.sendKeys(value);
} else {
if (element instanceof SelectValue) {
((SelectValue) element).selectByValue(value);
} else {
if (element instanceof CheckBox) {
((CheckBox) element).set(Boolean.valueOf(value));
} else {
throw new AutotestError("Incorrect element type: " + key);
}
}
}
return (T) this;
}
Aggregations