use of org.openqa.selenium.support.ui.WebDriverWait in project iTest by e-government-ua.
the class CustomMethods method setTableCellsSelectUp.
public void setTableCellsSelectUp(WebDriver driver, String serviceName, String cssSelector) {
WebElement td = driver.findElement(By.cssSelector(cssSelector));
new WebDriverWait(driver, 5).until(ExpectedConditions.elementToBeClickable(td));
// td.click();
Select select = new Select(td);
}
use of org.openqa.selenium.support.ui.WebDriverWait in project iTest by e-government-ua.
the class CustomMethods method setTableCellsInputTypeEnum.
public void setTableCellsInputTypeEnum(WebDriver driver, String serviceName, String tableName, String cellName, String NameRow, String text) {
// WebElement td = driver.findElement(By.cssSelector("#field-"+tableName+" option[value=\""+value+"\"]"));
WebElement td = driver.findElement(By.cssSelector("#field-" + tableName + " select[name=" + cellName + NameRow + "]"));
new WebDriverWait(driver, 5).until(ExpectedConditions.elementToBeClickable(td));
td.click();
Select select = new Select(td);
select.selectByVisibleText(text);
}
use of org.openqa.selenium.support.ui.WebDriverWait in project iTest by e-government-ua.
the class CustomMethods method setRegionTableCellsInputTypeCalendar.
public void setRegionTableCellsInputTypeCalendar(WebDriver driver, String serviceName, String tableName, String cellName, String NameRow, String date) {
WebElement td = driver.findElement(By.cssSelector(".ng-scope." + serviceName + "_--_" + tableName + "_--_COL_" + cellName + "_--_ROW_" + NameRow + " input"));
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 setFieldfieldPhone.
public void setFieldfieldPhone(WebDriver driver, String serviceName, String cssSelector, String value) {
WebElement webElement = driver.findElement(By.cssSelector(".form-control.ng-pristine.ng-untouched.ng-scope.ng-invalid.ng-invalid-tel.ng-valid-required." + serviceName + "_--_" + cssSelector));
new WebDriverWait(driver, 5).until(ExpectedConditions.elementToBeClickable(webElement));
webElement.click();
webElement.clear();
webElement.sendKeys(value);
}
use of org.openqa.selenium.support.ui.WebDriverWait in project iTest by e-government-ua.
the class CustomMethods method SetRegionFieldInputTypeDouble.
public void SetRegionFieldInputTypeDouble(WebDriver driver, String serviceName, String cssSelector, String value) {
WebElement webElement = driver.findElement(By.cssSelector("input[name='" + cssSelector + "']"));
new WebDriverWait(driver, 5).until(ExpectedConditions.elementToBeClickable(webElement));
// webElement.click();
webElement.clear();
webElement.sendKeys(value);
}
Aggregations