use of org.openqa.selenium.support.ui.WebDriverWait in project iTest by e-government-ua.
the class CustomMethods method setTableCellsTypeCalendar.
public void setTableCellsTypeCalendar(WebDriver driver, String serviceName, String tableName, String cellName, String NameRow, String date) {
WebElement td = driver.findElement(By.cssSelector("#field-" + tableName + " input[name=" + cellName + NameRow + "]"));
new WebDriverWait(driver, 5).until(ExpectedConditions.elementToBeClickable(td));
((JavascriptExecutor) driver).executeScript("angular.element(document.getElementsByName('" + cellName + NameRow + "')[0]).removeAttr('readonly');");
td.click();
td.clear();
td.sendKeys(date);
}
use of org.openqa.selenium.support.ui.WebDriverWait in project iTest by e-government-ua.
the class CustomMethods method SetRegionFieldInputTypeDate.
public void SetRegionFieldInputTypeDate(WebDriver driver, String serviceName, String cssSelector, String date) {
WebElement webElement = driver.findElement(By.cssSelector("input[name='" + cssSelector + "']"));
new WebDriverWait(driver, 5).until(ExpectedConditions.elementToBeClickable(webElement));
((JavascriptExecutor) driver).executeScript("angular.element(document.getElementsByName('" + cssSelector + "')[0]).removeAttr('readonly');");
// webElement.click();
webElement.clear();
webElement.sendKeys(date);
}
use of org.openqa.selenium.support.ui.WebDriverWait in project iTest by e-government-ua.
the class CustomMethods method clickButtonEcp.
public void clickButtonEcp() {
WebElement element = driver.findElement(By.xpath("//button[contains(@onclick,'startClientSign()')]"));
new WebDriverWait(driver, 5).until(ExpectedConditions.elementToBeClickable(element));
element.sendKeys("src/test/resources/files/Key-6.dat");
}
use of org.openqa.selenium.support.ui.WebDriverWait in project iTest by e-government-ua.
the class CustomMethods method waitForElementPresent.
public void waitForElementPresent(WebDriver driver, WebElement webElement, int timeoutInSeconds, int pollingInterval) throws Exception {
WebDriverWait wait = new WebDriverWait(driver, timeoutInSeconds, pollingInterval);
wait.until(ExpectedConditions.visibilityOf(webElement));
}
use of org.openqa.selenium.support.ui.WebDriverWait in project iTest by e-government-ua.
the class CustomMethods method assertThis.
public void assertThis(WebDriver driver, WebElement webElement, String textAssert) {
new WebDriverWait(driver, 30).until(ExpectedConditions.visibilityOf(webElement));
Assert.assertEquals(webElement.getText(), textAssert);
}
Aggregations