Example usage for org.openqa.selenium WebDriverException getBuildInformation

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

Introduction

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

Prototype

public BuildInfo getBuildInformation() 

Source Link

Usage

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

License:Open Source License

public static PhantomJSDriver createPhantomJSWebDriver() {
    PhantomJSDriver driver;//from w  w  w .jav a2s.c o  m
    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;
}