public String setText(WebDriver driver, WebDriverWait wait, String text, String element)
{
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(element)));
driver.findElement(By.id(element)).sendKeys(text);
return driver.findElement(By.id(element)).getAttribute("value");
}
|