/** * Get the EdgeDriverService to use. Exists to allow subclasses to override. * * @return the default Edge service. */ public EdgeDriverService getEdgeDriverService() { return EdgeDriverService.createDefaultService(); }
@Override protected EdgeDriverService createDriverService(File exe, int port, ImmutableList<String> args, ImmutableMap<String, String> environment) { try { EdgeDriverService service = new EdgeDriverService(exe, port, args, environment); if (getLogFile() != null) { service.sendOutputTo(new FileOutputStream(getLogFile())); } else { String logFile = System.getProperty(EDGE_DRIVER_LOG_PROPERTY); if (logFile != null) { service.sendOutputTo(new FileOutputStream(logFile)); } } return service; } catch (IOException e) { throw new WebDriverException(e); } } }
/** * Creates a new EdgeDriver instance with the specified options. * * @param options The options to use. * @see #EdgeDriver(EdgeDriverService, EdgeOptions) */ public EdgeDriver(EdgeOptions options) { this(EdgeDriverService.createDefaultService(), options); }
@Override public boolean isAvailable() { try { EdgeDriverService.createDefaultService(); return true; } catch (IllegalStateException | WebDriverException e) { return false; } }
@Override public EdgeDriverService getDriverService() { return EdgeDriverService.createDefaultService(); }
/** * Creates a new EdgeDriver instance. The {@code capabilities} will be passed to the * edgedriver service. * * @param capabilities The capabilities required from the EdgeDriver. * @see #EdgeDriver(EdgeDriverService, Capabilities) * @deprecated Use {@link EdgeDriver(EdgeOptions)} */ @Deprecated public EdgeDriver(Capabilities capabilities) { this(EdgeDriverService.createDefaultService(), capabilities); }
/** * Creates a new EdgeDriver using the {@link EdgeDriverService#createDefaultService default} * server configuration. * * @see #EdgeDriver(EdgeDriverService, EdgeOptions) */ public EdgeDriver() { this(EdgeDriverService.createDefaultService(), new EdgeOptions()); }
@Override public WebDriver getDriver() { System.setProperty("webdriver.edge.driver", driverPath); // System.setProperty("webdriver.ie.driver.loglevel", "DEBUG"); org.openqa.selenium.edge.EdgeDriverService service = org.openqa.selenium.edge.EdgeDriverService.createDefaultService(); EdgeOptions options = new EdgeOptions(); return new EdgeDriver(service, options); } }
public Browser createBrowser() { EdgeDriverService service = EdgeDriverService.createDefaultService(); DesiredCapabilities capabilities = getDefaultCapabilities(); return createBrowser(new EdgeDriver(service, capabilities)); }