Package com.opera.core.systems.testing.drivers

Examples of com.opera.core.systems.testing.drivers.TestDriver.quit()


    if (current == null) {
      return;
    }

    try {
      current.quit();
    } catch (RuntimeException ignored) {
      // fall through
    } finally {
      storedDriver.remove();
    }
View Full Code Here


      (new WebDriverWait(driver, 2)).until(ExpectedConditions.presenceOfElementLocated(by));
    } catch (TimeoutException e) {
      fail("Custom opera extension not detected!");
    }

    driver.quit();
  }

}
View Full Code Here

    DesiredCapabilities c = new DesiredCapabilities();
    c.setCapability(OperaSettings.Capability.PORT.getCapability(), -1);

    TestDriver a = new TestDriverBuilder().using(c).get();
    assertEquals(7001, a.preferences().get("Developer Tools", "Proxy Port").getValue());
    a.quit();
  }

  @Test
  public void testRandomPort() {
    DesiredCapabilities c = new DesiredCapabilities();
View Full Code Here

        fail("Unexpected exception: " + e);
        return;
      }
    }
    Assert.assertNotSame("7001", a.preferences().get("Developer Tools", "Proxy Port").toString());
    a.quit();
  }

  @Test
  @Ignore(products = CORE,
          value = "Once this is set the autotestmode profile no longer connects on 7001, breaking future tests")
View Full Code Here

        return;
      }
    }

    assertEquals(9876, a.preferences().get("Developer Tools", "Proxy Port").getValue());
    a.quit();
  }

}
View Full Code Here

    TestDriver driver = new TestDriverBuilder().using(settings).get();

    assertNotNull(driver);
    assertTrue("Expected Opera to run", driver.isRunning());

    driver.quit();
  }

  @Test
  public void binaryInvalidThrowsException() {
    try {
View Full Code Here

    TestDriver driver = new TestDriverBuilder().using(settings).get();

    assertEquals(OperaProduct.MOBILE, driver.utils().getProduct());
    assertEquals(OperaProduct.MOBILE, driver.getSettings().getProduct());

    driver.quit();
  }

  @Test
  public void autostartIsRespected() {
    settings.autostart(false);
View Full Code Here

    TestDriver driver = new TestDriverBuilder().using(settings).get();

    assertNotNull(driver);
    assertEquals(newLauncher, driver.getSettings().getLauncher());

    driver.quit();
  }

  @Test
  @Ignore(value = "Needs investigation")
  public void loggingFileReceivesOutput() throws IOException {
View Full Code Here

    settings.logging().setFile(log);
    settings.logging().setLevel(Level.FINER);

    TestDriver driver = new TestDriverBuilder().using(settings).get();
    driver.quit();

    assertTrue(log.length() > 0);
  }

  @Test
View Full Code Here

    assertNotNull(driver);
    assertEquals(profile, driver.preferences().get("User Prefs", "Opera Directory").getValue());
    assertEquals(profile, driver.getSettings().profile().getDirectory());

    driver.quit();
  }

  @Test
  public void profileCanBeSetUsingString() throws IOException {
    tmp.create();
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.