use of org.openqa.selenium.support.ui.WebDriverWait in project archiva by apache.
the class ArchivaAdminTest method testInitialRepositories.
@Test
public void testInitialRepositories() {
WebDriverWait wait = new WebDriverWait(getWebDriver(), 20);
WebElement el;
el = wait.until(ExpectedConditions.elementToBeClickable(By.id("menu-repositories-list-a")));
tryClick(el, ExpectedConditions.presenceOfElementLocated(By.xpath("//table[@id='managed-repositories-table']//td[contains(text(),'internal')]")), "Managed Repositories not activated");
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//table[@id='managed-repositories-table']//td[contains(text(),'snapshots')]")));
el = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@href='#remote-repositories-content']")));
tryClick(el, ExpectedConditions.visibilityOfElementLocated(By.xpath("//table[@id='remote-repositories-table']//td[contains(text(),'central')]")), "Remote Repositories View not available");
}
use of org.openqa.selenium.support.ui.WebDriverWait in project archiva by apache.
the class LoginTest method testWithBadPassword.
@Test
public void testWithBadPassword() {
goToLoginPage();
setFieldValue("user-login-form-username", getProperty("ADMIN_USERNAME"));
setFieldValue("user-login-form-password", "badPassword");
clickLinkWithLocator("modal-login-ok", false);
WebDriverWait wait = new WebDriverWait(getWebDriver(), 2);
wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("modal-login"), "You have entered an incorrect username and/or password"));
}
use of org.openqa.selenium.support.ui.WebDriverWait in project tuerauf-backend-java by dsteinkopf.
the class SeleniumHelper method waitForComponentWithClassName.
public static boolean waitForComponentWithClassName(final WebDriver webDriver, final String className) {
try {
final WebDriverWait wait = new WebDriverWait(webDriver, DEFAULT_PAGE_LOAD_WAIT);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.className(className)));
return true;
} catch (final TimeoutException te) {
logger.error(te);
return false;
}
}
use of org.openqa.selenium.support.ui.WebDriverWait in project tuerauf-backend-java by dsteinkopf.
the class SeleniumHelper method waitForComponentWithLocator.
public static boolean waitForComponentWithLocator(final WebDriver webDriver, final By locator) {
try {
final WebDriverWait wait = new WebDriverWait(webDriver, DEFAULT_PAGE_LOAD_WAIT);
wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
return true;
} catch (final TimeoutException te) {
logger.error(te);
return false;
}
}
use of org.openqa.selenium.support.ui.WebDriverWait in project CollectiveOneWebapp by CollectiveOne.
the class NotificationsModule method checkTagFillter.
public Boolean checkTagFillter(WebDriver driver) {
(driver.findElement(By.id("T_goToHomePage"))).click();
try {
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.elementToBeClickable(By.name("T_selectTagInputInitiative")));
WebElement selectTag_InputModal = driver.findElement(By.name("T_selectTagInputInitiative"));
//
selectTag_InputModal.sendKeys("heello");
selectTag_InputModal.sendKeys(Keys.ENTER);
return true;
} catch (Exception exception) {
System.out.println("Failed @ checkTagFillter(): " + exception);
return false;
}
}
Aggregations