private WebDriver createInternetExplorerDriver(Config config, Proxy proxy) { DesiredCapabilities capabilities = createCommonCapabilities(config, proxy); InternetExplorerOptions options = new InternetExplorerOptions(capabilities); if (!config.browserBinary().isEmpty()) { log.info("Using browser binary: " + config.browserBinary()); log.warning("Changing browser binary not supported in InternetExplorer, setting will be ignored."); } return new InternetExplorerDriver(options); } }
@Override protected InternetExplorerOptions newOptions() { return new InternetExplorerOptions(); }
@Override public WebDriver getWebDriver(Capabilities capabilities) { return new InternetExplorerDriver(new InternetExplorerOptions(capabilities)); } }
@Override public WebDriver create(Capabilities capabilities, Properties properties) { return new InternetExplorerDriver(new InternetExplorerOptions(capabilities)); } },
@Override public WebDriver create(Capabilities capabilities, Properties properties) { return new InternetExplorerDriver(new InternetExplorerOptions(capabilities)); } },
public static InternetExplorerOptions getInternetExplorerOptions(Map<String, Object> profile) { InternetExplorerOptions ieOptions = new InternetExplorerOptions(); if (profile != null) { for (Map.Entry<String, Object> profileEntry : profile.entrySet()) { ieOptions.setCapability(profileEntry.getKey(), profileEntry.getValue()); } } return ieOptions; } }
public InternetExplorerOptions defaultIEOptions() { InternetExplorerOptions cap = new InternetExplorerOptions(); cap.setCapability(INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true); cap.setCapability("ignoreZoomSetting", true); //cap.setCapability("requireWindowFocus", true); return (InternetExplorerOptions) modifyCapabilities.apply(cap); } public String registerDriver(DriverTypes driverType, Supplier<WebDriver> driver) {
public InternetExplorerOptions defaultIEOptions() { InternetExplorerOptions cap = new InternetExplorerOptions(); cap.setCapability(INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true); cap.setCapability("ignoreZoomSetting", true); //cap.setCapability("requireWindowFocus", true); return (InternetExplorerOptions) modifyCapabilities.apply(cap); } public String registerDriver(DriverTypes driverType, Supplier<WebDriver> driver) {
@Override public InternetExplorerOptions getDefaultOptions() { InternetExplorerOptions options = new InternetExplorerOptions(); // Help with slow typing options.introduceFlakinessByIgnoringSecurityDomains(); options.requireWindowFocus(); return options; }
/** * Create and initialize InternetExplorerOptions. * * @param driverOptions driver options. * @return InternetExplorerOptions. */ public static InternetExplorerOptions newInternetExplorerOptions(DriverOptions driverOptions) { InternetExplorerOptions options = new InternetExplorerOptions(); Proxy proxy = newProxy(driverOptions); if (proxy != null) options.setProxy(proxy); return options; }
/** * @deprecated Create an {@link InternetExplorerDriverService} and then use that to create a * {@link RemoteWebDriver#RemoteWebDriver(org.openqa.selenium.remote.CommandExecutor, Capabilities)} with a * {@link DriverCommandExecutor}. */ @Deprecated public InternetExplorerDriver( InternetExplorerDriverService service, Capabilities capabilities, int port) { if (capabilities == null) { capabilities = DesiredCapabilities.internetExplorer(); } Preconditions.checkNotNull(capabilities); capabilities = new InternetExplorerOptions(capabilities); if (service == null) { service = setupService(capabilities, port); } run(service, capabilities); }
@Override public InternetExplorerOptions getCapabilities() { InternetExplorerOptions ieOptions = new InternetExplorerOptions(); ieOptions.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true); ieOptions.setCapability(InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING, true); ieOptions.setCapability("requireWindowFocus", true); return ieOptions; }
private void setupIE() { InternetExplorerOptions explorerOptions = new InternetExplorerOptions(); explorerOptions.destructivelyEnsureCleanSession(); capabilities.setCapability("se:ieOptions", explorerOptions); capabilities.merge(explorerOptions); }
/** * Задает options для запуска IE драйвера * options можно передавать, как системную переменную, например -Doptions=--load-extension=my-custom-extension * @return internetExplorerOptions */ private InternetExplorerOptions getIEDriverOptions(DesiredCapabilities capabilities) { log.info("---------------IE Driver---------------------"); InternetExplorerOptions internetExplorerOptions = !options[0].equals("") ? new InternetExplorerOptions().addCommandSwitches(options) : new InternetExplorerOptions(); internetExplorerOptions.setCapability(CapabilityType.BROWSER_VERSION, loadSystemPropertyOrDefault(CapabilityType.BROWSER_VERSION, VERSION_LATEST)); internetExplorerOptions.setCapability("ie.usePerProcessProxy", "true"); internetExplorerOptions.setCapability("requireWindowFocus", "false"); internetExplorerOptions.setCapability("ie.browserCommandLineSwitches", "-private"); internetExplorerOptions.setCapability("ie.ensureCleanSession", "true"); internetExplorerOptions.merge(capabilities); return internetExplorerOptions; }
@Override public WebDriver create(WebDriverFactory webDriverFactory, DesiredCapabilities desiredCapabilities) { InternetExplorerDriverServiceProperties serviceProperties = webDriverFactory.driverServices == null ? null : webDriverFactory.driverServices.getInternetExplorer(); DriverService driverService = serviceProperties == null ? null : serviceProperties.getDriverService(); InternetExplorerOptions internetExplorerOptions = new InternetExplorerOptions().merge(desiredCapabilities); return driverService == null ? new InternetExplorerDriver(internetExplorerOptions) : new RemoteWebDriver(driverService.getUrl(), internetExplorerOptions); } },
@Override protected MutableCapabilities getDriverOptions() { InternetExplorerOptions options = new InternetExplorerOptions(); options.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true); options.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true); options.setCapability(InternetExplorerDriver.INITIAL_BROWSER_URL, "about:blank"); options.setCapability(InternetExplorerDriver.IGNORE_ZOOM_SETTING, true); // options.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true); // options.setCapability(InternetExplorerDriver.NATIVE_EVENTS, true); if (webDriverConfig.isDevMode()) { options.setCapability(InternetExplorerDriver.LOG_LEVEL, "TRACE"); } return options; }
driver = new HtmlUnitDriver(DesiredCapabilities.htmlUnit().merge(cap)); } else if ("InternetExplorer".equalsIgnoreCase(this.browserType)) { driver = new InternetExplorerDriver(new InternetExplorerOptions(cap)); } else if ("JBD".equalsIgnoreCase(this.browserType)) { cap.setCapability("jbd.headless", isHeadless());
break; case IE11: desiredCapabilities = new InternetExplorerOptions();