Examples of dismiss()


Examples of org.openqa.selenium.Alert.dismiss()

      Alert alert = driver.switchTo().alert();
      String alertText = alert.getText();
      if (acceptNextAlert) {
        alert.accept();
      } else {
        alert.dismiss();
      }
      return alertText;
    } finally {
      acceptNextAlert = true;
    }
View Full Code Here

Examples of org.openqa.selenium.Alert.dismiss()

      return;
    }
    Alert alert = get_current_alert_box();
    if(alert != null) {
      action("Dismissed the javascript popup '" + alert.getText() + "'");
      alert.dismiss();
    }
  }
 
  @Beta
  public void javascript_authentication(String username, String password) {
View Full Code Here

Examples of org.openqa.selenium.Alert.dismiss()

      return;
    }
    Alert alert = get_current_alert_box();
    if(alert != null) {
      action("Dismissed the javascript popup '" + alert.getText() + "'");
      alert.dismiss();
    }
  }
 
  @Beta
  public void javascript_authentication(String username, String password) {
View Full Code Here

Examples of org.openqa.selenium.Alert.dismiss()

      return;
    }
    Alert alert = get_current_alert_box();
    if(alert != null) {
      action("Dismissed the javascript popup '" + alert.getText() + "'");
      alert.dismiss();
    }
  }
 
  @Beta
  public void javascript_authentication(String username, String password) {
View Full Code Here

Examples of org.openqa.selenium.Alert.dismiss()

      el.getAttribute("name");
      Assert.fail("cannot interact while action sheet is opened");
    } catch (UnhandledAlertException e) {
    }
    Alert alert = driver.switchTo().alert();
    alert.dismiss();
  }

  @Test
  public void okCancel() throws Exception {
    By b = By.xpath(actionOKCancel);
View Full Code Here

Examples of org.openqa.selenium.Alert.dismiss()

    By b = By.xpath(actionOKCancel);
    WebElement el = driver.findElement(b);
    el.click();

    Alert alert = driver.switchTo().alert();
    alert.dismiss();
    try {
      driver.switchTo().alert();
      Assert.fail();
    } catch (NoAlertPresentException e) {
      // ignore
View Full Code Here

Examples of org.openqa.selenium.Alert.dismiss()

    WebElement el = driver.findElement(b);
    el.click();

    Alert alert = waitForAlert(driver);
    Assert.assertEquals(alert.getText(), "<Alert message>");
    alert.dismiss();
    waitForAlertToBeGone();
  }

  private void waitForAlertToBeGone() throws InterruptedException {
    // TODO freynaud dismiss should block until alert is gone.
View Full Code Here

Examples of org.openqa.selenium.Alert.dismiss()

    By b = By.xpath(alertLocator);
    WebElement el = driver.findElement(b);
    el.click();

    Alert alert = waitForAlert(driver);
    alert.dismiss();

    try {
      d.switchTo().alert();
      Assert.fail("alert should be gone.");
    } catch (NoAlertPresentException e) {
View Full Code Here

Examples of org.openqa.selenium.Alert.dismiss()

      alert.sendKeys("test");
      Assert.fail("should crash on sendKeys");
    } catch (InvalidElementStateException e) {
      //expected
    }
    alert.dismiss();
  }

  @Test
  public void sendKeysAlert() throws Exception {
    RemoteWebDriver d = (RemoteWebDriver) driver;
View Full Code Here

Examples of org.openqa.selenium.Alert.dismiss()

            Alert alert = driver.switchTo().alert();
            String alertText = alert.getText();
            if (acceptNextAlert) {
                alert.accept();
            } else {
                alert.dismiss();
            }
            return alertText;
        } finally {
            acceptNextAlert = true;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.