use of org.openqa.selenium.support.ui.WebDriverWait in project iTest by e-government-ua.
the class CustomMethods method setRegionTableCellsInputTypeString.
// Methods for filling the fields of table for central //._test_autotest_dashboard_--_sTable3_--_COL_sTables3Field1_--_ROW_0 input
public void setRegionTableCellsInputTypeString(WebDriver driver, String serviceName, String tableName, String cellName, String NameRow, String text) {
WebElement td = driver.findElement(By.cssSelector("." + serviceName + "_--_" + tableName + "_--_COL_" + cellName + "_--_ROW_" + NameRow + " input"));
new WebDriverWait(driver, 5).until(ExpectedConditions.elementToBeClickable(td));
td.click();
td.clear();
td.sendKeys(text);
}
use of org.openqa.selenium.support.ui.WebDriverWait in project iTest by e-government-ua.
the class CustomMethods method setFieldTypeSelect.
public void setFieldTypeSelect(WebDriver driver, String serviceName, String cssSelector, String row) {
WebElement webElement = driver.findElement(By.cssSelector("#field-" + cssSelector));
new WebDriverWait(driver, 5).until(ExpectedConditions.elementToBeClickable(webElement));
webElement.click();
//#ui-select-choices-row-1-1 > a #ui-select-choices-row-7-1 > a
driver.findElement(By.cssSelector("#ui-select-choices-row" + row + " > a")).click();
}
use of org.openqa.selenium.support.ui.WebDriverWait in project iTest by e-government-ua.
the class CustomMethods method setRegionTableCellsInputTypeEnum.
public void setRegionTableCellsInputTypeEnum(WebDriver driver, String serviceName, String tableName, String cellName, String NameRow, String text) {
//ng-scope
WebElement td = driver.findElement(By.cssSelector(".ng-scope." + serviceName + "_--_" + tableName + "_--_COL_" + cellName + "_--_ROW_" + NameRow + " 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 setFieldValue.
public void setFieldValue(WebDriver driver, String serviceName, String cssSelector, String value) {
WebElement webElement = driver.findElement(By.cssSelector("." + 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 setFieldSelectSlotTime.
// TODO Как будет нормальный локатор для выбора времени Пример: ._test_all_case_--_visitTime переделать метод и перенести в кастом
public void setFieldSelectSlotTime(WebDriver driver, String serviceName, String cssSelector) {
Boolean status;
try {
//By.xpath("//select[@ng-model='selected.slot']")
WebElement webElement = driver.findElement(By.xpath("//select[@ng-model='selected.slot']"));
new WebDriverWait(driver, 5).until(ExpectedConditions.elementToBeClickable(webElement));
Select select = new Select(webElement);
select.selectByValue("0");
status = true;
} catch (org.openqa.selenium.NoSuchElementException e) {
status = false;
}
Assert.assertTrue(status, "NO AVAILABLE SLOTS TIME!, NO AVAILABLE SLOTS TIME!, NO AVAILABLE SLOTS TIME!");
}
Aggregations