Пример #1
0
  @NeedsFreshDriver
  @Test
  public void shouldWaitUntilBrowserHasClosedProperly() throws Exception {
    driver.get(pages.simpleTestPage);
    driver.quit();
    JUnit4TestBase.removeDriver();

    driver = new WebDriverBuilder().get();

    driver.get(pages.formPage);
    WebElement textarea = driver.findElement(By.id("withText"));
    String sentText = "I like cheese\n\nIt's really nice";
    String expectedText = textarea.getAttribute("value") + sentText;
    textarea.sendKeys(sentText);
    wait.until(elementValueToEqual(textarea, expectedText));
    driver.quit();
  }
 @AfterClass
 public static void cleanUpDriver() {
   JUnit4TestBase.removeDriver();
 }
Пример #3
0
 @AfterClass
 public static void quitDriver() {
   JUnit4TestBase.removeDriver();
 }