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

Examples of com.opera.core.systems.testing.drivers.TestDriver


    if (!Platform.getCurrent().is(WINDOWS)) {
      newLauncher.setExecutable(true);
    }

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

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

    driver.quit();
  }
View Full Code Here


    File log = tmp.newFile("operadriver.log");

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

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

    assertTrue(log.length() > 0);
  }
View Full Code Here

  @Ignore(products = CORE, value = "core does not support -pd")
  public void profileIsRespected() throws IOException {
    tmp.create();
    File profile = tmp.newFolder();
    settings.setProfile(profile.getPath());
    TestDriver driver = new TestDriverBuilder().using(settings).get();

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

    driver.quit();
  }
View Full Code Here

  @Test
  @Ignore("CORE-44852: Unable to automatically connect debugger to non-loopback address")
  public void hostIsRespectedOnLaunch() {
    String host = NETWORK_UTILS.getIp4NonLoopbackAddressOfThisMachine().getHostAddress();
    settings.setHost(host);
    TestDriver driver = new TestDriverBuilder().using(settings).get();

    assertNotNull(driver);
    assertEquals(host, driver.getSettings().getHost());
    assertEquals(host, driver.preferences().get("Developer Tools", "Proxy Host").getValue());

    driver.quit();
  }
View Full Code Here

  }

  @Test
  public void portCanBeSet() {
    settings.setPort(1234);
    TestDriver driver = new TestDriverBuilder().using(settings).get();
    assertNotNull(driver);
    assertEquals(1234, driver.getSettings().getPort());
    driver.quit();
  }
View Full Code Here

  }

  @Test
  public void runnerIsUsed() {
    settings.setRunner(OperaLauncherRunner.class);
    TestDriver driver = new TestDriverBuilder().using(settings).get();
    assertNotNull(driver);
    assertEquals(driver.getRunner().getClass(), settings.getRunner().getClass());
  }
View Full Code Here

  @Test
  @Ignore(products = {CORE, MOBILE},
          value = "core does not reset port number if -debugproxy is omitted")
  public void settingPort() {
    settings.setPort(SERVER_DEFAULT_PORT_IDENTIFIER);
    TestDriver driver = new TestDriverBuilder().using(settings).get();
    assertNotNull(driver);
    driver.quit();
  }
View Full Code Here

  @Ignore(platforms = LINUX)
  public void environmentalBinaryPathWorks() throws IOException {
    File binary = OperaBinary.find();
    environment.set(OperaBinary.OPERA_PATH_ENV_VAR, binary.getPath());

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

    assertEquals(binary.getCanonicalPath(), driver.getSettings().getBinary().getCanonicalPath());
    assertEquals(binary.getCanonicalPath(), driver.utils().getBinaryPath());

    driver.quit();
  }
View Full Code Here

  @NeedsLocalEnvironment
  public void detachBrowser() {
    OperaSettings settings = new OperaSettings();
    settings.setDetach(true);

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

    Integer processID = driver.utils().getPID();
    assertNotNull("Failed to get process ID from driver", processID);

    driver.quit();

    assertFalse("OperaDriver should not be connected to Opera", driver.getServices().isConnected());
    assertTrue("Opera should be running", ProcessManager.isPidRunning(processID));

    ProcessManager.killPID(processID);
  }
View Full Code Here

    ProcessManager.killPID(processID);
  }

  private void assertDriverCreated(OperaSettings settings) {
    TestDriver driver = new TestDriverBuilder().using(settings).get();
    assertNotNull(driver);
    driver.quit();
  }
View Full Code Here

TOP

Related Classes of com.opera.core.systems.testing.drivers.TestDriver

Copyright © 2018 www.massapicom. 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.