Example usage for org.openqa.selenium.edge EdgeDriverService EDGE_DRIVER_EXE_PROPERTY

List of usage examples for org.openqa.selenium.edge EdgeDriverService EDGE_DRIVER_EXE_PROPERTY

Introduction

In this page you can find the example usage for org.openqa.selenium.edge EdgeDriverService EDGE_DRIVER_EXE_PROPERTY.

Prototype

String EDGE_DRIVER_EXE_PROPERTY

To view the source code for org.openqa.selenium.edge EdgeDriverService EDGE_DRIVER_EXE_PROPERTY.

Click Source Link

Document

System property that defines the location of the EdgeDriver executable that will be used by the default service.

Usage

From source file:com.seleniumtests.browserfactory.EdgeCapabilitiesFactory.java

License:Apache License

@Override
protected String getDriverExeProperty() {
    return EdgeDriverService.EDGE_DRIVER_EXE_PROPERTY;
}

From source file:com.seleniumtests.ut.browserfactory.TestEdgeCapabilityFactory.java

License:Apache License

@Test(groups = { "ut" })
public void testCreateEdgeCapabilitiesStandardDriverPathLocal() {
    try {/*from  ww w. j a v  a  2s.  c  om*/
        Mockito.when(config.getMode()).thenReturn(DriverMode.LOCAL);

        new EdgeCapabilitiesFactory(config).createCapabilities();

        Assert.assertTrue(System.getProperty(EdgeDriverService.EDGE_DRIVER_EXE_PROPERTY)
                .replace(File.separator, "/").contains("/drivers/MicrosoftWebDriver_"));
    } finally {
        System.clearProperty(EdgeDriverService.EDGE_DRIVER_EXE_PROPERTY);
    }
}

From source file:com.seleniumtests.ut.browserfactory.TestEdgeCapabilityFactory.java

License:Apache License

@Test(groups = { "ut" })
public void testCreateEdgeCapabilitiesOverrideDriverPathLocal() {
    try {//from  w w  w. j  ava2  s.c om
        Mockito.when(config.getMode()).thenReturn(DriverMode.LOCAL);
        Mockito.when(config.getEdgeDriverPath()).thenReturn("/opt/edge/driver/edgedriver");

        new EdgeCapabilitiesFactory(config).createCapabilities();

        Assert.assertEquals(
                System.getProperty(EdgeDriverService.EDGE_DRIVER_EXE_PROPERTY).replace(File.separator, "/"),
                "/opt/edge/driver/edgedriver");
    } finally {
        System.clearProperty(EdgeDriverService.EDGE_DRIVER_EXE_PROPERTY);
    }
}

From source file:com.seleniumtests.ut.browserfactory.TestEdgeCapabilityFactory.java

License:Apache License

@Test(groups = { "ut" })
public void testCreateEdgeCapabilitiesStandardDriverPathGrid() {
    Mockito.when(config.getMode()).thenReturn(DriverMode.GRID);

    new EdgeCapabilitiesFactory(config).createCapabilities();

    Assert.assertNull(System.getProperty(EdgeDriverService.EDGE_DRIVER_EXE_PROPERTY));
}