private WebDriver createEdgeDriver(Config config, Proxy proxy) { DesiredCapabilities capabilities = createCommonCapabilities(config, proxy); EdgeOptions options = new EdgeOptions(); options.merge(capabilities); if (!config.browserBinary().isEmpty()) { log.info("Using browser binary: " + config.browserBinary()); log.warning("Changing browser binary not supported in Edge, setting will be ignored."); } return new EdgeDriver(options); } }
/** * Creates a new EdgeDriver instance. The {@code service} will be started along with the driver, * and shutdown upon calling {@link #quit()}. * * @param service The service to use. * @see #EdgeDriver(EdgeDriverService, EdgeOptions) */ public EdgeDriver(EdgeDriverService service) { this(service, new EdgeOptions()); }
@Override public EdgeOptions getCapabilities() { return new EdgeOptions(); }
private EdgeOptions getInitializedEdgeOptions() { if (this.edgeOptions == null) { this.edgeOptions = new EdgeOptions(); } return this.edgeOptions; }
private EdgeOptions getInitializedEdgeOptions() { if (this.edgeOptions == null) { this.edgeOptions = new EdgeOptions(); } return this.edgeOptions; }
@Override public EdgeOptions getDefaultOptions() { return new EdgeOptions(); }
@Override public MutableCapabilities getOptions(Parameter parameter, Optional<Object> testInstance) throws IOException, IllegalAccessException { EdgeOptions edgeOptions = new EdgeOptions(); EdgeOptions optionsFromAnnotatedField = annotationsReader .getOptionsFromAnnotatedField(testInstance, Options.class, EdgeOptions.class); if (optionsFromAnnotatedField != null) { edgeOptions = optionsFromAnnotatedField; } return edgeOptions; }
private void setupEdge() { EdgeOptions edgeOptions = new EdgeOptions(); capabilities.merge(edgeOptions); } }
/** * 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); } }
@Override protected MutableCapabilities getDriverOptions() { if (!SystemUtils.IS_OS_WINDOWS_10 && webDriverConfig.getMode() == DriverMode.LOCAL) { throw new ConfigurationException("Edge browser is only available on Windows 10"); } return new EdgeOptions(); }
@Override public WebDriver getWebDriver(Capabilities capabilities) { final EdgeOptions edgeOptions; if (capabilities instanceof EdgeOptions) { edgeOptions = (EdgeOptions) capabilities; } else { edgeOptions = new EdgeOptions().merge(capabilities); } return new EdgeDriver(edgeOptions); } }
/** * Create and initialize InternetExplorerOptions. * * @param driverOptions driver options. * @return InternetExplorerOptions. */ public static EdgeOptions newEdgeOptions(DriverOptions driverOptions) { EdgeOptions options = new EdgeOptions(); Proxy proxy = newProxy(driverOptions); if (proxy != null) options.setProxy(proxy); return options; }
/** * Задает options для запуска Edge драйвера * options можно передавать, как системную переменную, например -Doptions=--load-extension=my-custom-extension * @return edgeOptions */ private EdgeOptions getEdgeDriverOptions(DesiredCapabilities capabilities) { log.info("---------------Edge Driver---------------------"); EdgeOptions edgeOptions = new EdgeOptions(); edgeOptions.setCapability(CapabilityType.BROWSER_VERSION, loadSystemPropertyOrDefault(CapabilityType.BROWSER_VERSION, VERSION_LATEST)); edgeOptions.merge(capabilities); return edgeOptions; }
break; case EDGE: desiredCapabilities = new EdgeOptions(); break; case FIREFOX:
case "MicrosoftEdge": EdgeOptions MicrosoftEdgeOptions = new EdgeOptions(); capabilities.setCapability("edgeOptions", MicrosoftEdgeOptions); capabilities.setCapability("avoidProxy", true); case "edge": EdgeOptions edgeOptions = new EdgeOptions(); capabilities.setCapability("edgeOptions", edgeOptions); capabilities.setCapability("avoidProxy", true);