Example usage for org.openqa.selenium WebDriverException getSystemInformation

List of usage examples for org.openqa.selenium WebDriverException getSystemInformation

Introduction

In this page you can find the example usage for org.openqa.selenium WebDriverException getSystemInformation.

Prototype

public String getSystemInformation() 

Source Link

Usage

From source file:dk.dma.ais.abnormal.web.IntegrationTestHelper.java

License:Open Source License

public static PhantomJSDriver createPhantomJSWebDriver() {
    PhantomJSDriver driver;/*  w  w w . j ava 2 s .  com*/
    try {
        // DesiredCapabilities capabilities = new DesiredCapabilities();
        // PhantomJSDriverService driverService = PhantomJSDriverService.createDefaultService(capabilities);

        driver = new PhantomJSDriver(); //driverService, capabilities);
        driver.manage().window().setSize(new Dimension(1280, 1024));
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
    } catch (WebDriverException e) {
        System.err.println("Message - " + e.getMessage());
        System.err.println("Additional info - " + e.getAdditionalInformation());
        System.err.println("Support url - " + e.getSupportUrl());
        System.err.println("System info - " + e.getSystemInformation());
        System.err.println("Build info - " + e.getBuildInformation());
        throw e;
    } catch (Throwable t) {
        System.err.println("Class - " + t.getClass());
        System.err.println("Message - " + t.getMessage());
        System.err.println("--------");
        t.printStackTrace(System.err);
        System.err.println("--------");
        throw t;
    }

    return driver;
}