use of org.openqa.selenium.support.ui.WebDriverWait in project cucumber-jvm by cucumber.
the class NavigationStepdefs method i_am_on_the_front_page.
@Given("^I am on the front page$")
public void i_am_on_the_front_page() throws InterruptedException {
webDriver.get("http://localhost:" + ServerHooks.PORT);
// The input fields won't be enabled until the WebSocket has established
// a connection. Wait for this to happen.
WebDriverWait wait = new WebDriverWait(webDriver, 1);
wait.until(ExpectedConditions.elementToBeClickable(By.id("celcius")));
}
use of org.openqa.selenium.support.ui.WebDriverWait in project android by owncloud.
the class Actions method login.
public static FileListView login(String url, String user, String password, Boolean isTrusted, AndroidDriver driver) throws InterruptedException {
LoginForm loginForm = new LoginForm(driver);
CertificatePopUp certificatePopUp = loginForm.typeHostUrl(url);
if (!isTrusted) {
WebDriverWait wait = new WebDriverWait(driver, 30);
//and it doesn't appear again
try {
wait.until(ExpectedConditions.visibilityOf(certificatePopUp.getOkButtonElement()));
//we need to repaint the screen
//because of some element are misplaced
driver.rotate(ScreenOrientation.LANDSCAPE);
driver.rotate(ScreenOrientation.PORTRAIT);
certificatePopUp.clickOnOkButton();
} catch (NoSuchElementException e) {
}
}
loginForm.typeUserName(user);
loginForm.typePassword(password);
//TODO. Assert related to check the connection?
return loginForm.clickOnConnectButton();
}
use of org.openqa.selenium.support.ui.WebDriverWait in project selenium-tests by Wikia.
the class FacebookSignupModalComponentObject method acceptWikiaAppPolicy.
public void acceptWikiaAppPolicy() {
new WebDriverWait(driver, 10).until(new ExpectedCondition<Boolean>() {
@Nullable
@Override
public Boolean apply(WebDriver input) {
return input.getWindowHandles().size() > 1;
}
});
Object[] handles = driver.getWindowHandles().toArray();
driver.switchTo().window(handles[1].toString());
wait.forElementVisible(By.cssSelector("button[name='__CONFIRM__']"));
appTermsConfirmButton.click();
PageObjectLogging.log("acceptWikiaAppPolicy", "confirmed wikia apps privacy policy", true);
driver.switchTo().window(handles[0].toString());
}
use of org.openqa.selenium.support.ui.WebDriverWait in project selenium-tests by Wikia.
the class TopNoteModalDialog method clickApprove.
public void clickApprove() {
super.clickConfirm();
new WebDriverWait(driver, DiscussionsConstants.TIMEOUT).until((Predicate<WebDriver>) input -> !post.getAttribute("class").contains("is-reported"));
}
use of org.openqa.selenium.support.ui.WebDriverWait in project selenium-tests by Wikia.
the class DeleteDialog method confirmAndWait.
public void confirmAndWait() {
super.clickConfirm();
new WebDriverWait(driver, DiscussionsConstants.TIMEOUT).until((Predicate<WebDriver>) input -> postList.stream().allMatch(p -> p.getAttribute("class").contains("is-deleted")));
}
Aggregations