/** * Clear the Internet Explorer cache before launching the browser. When set clears the system * cache for all instances of Internet Explorer, even those already running when the driven * instance is launched. */ public InternetExplorerOptions destructivelyEnsureCleanSession() { return amend(IE_ENSURE_CLEAN_SESSION, true); }
/** * Enable persistently sending {@code WM_MOUSEMOVE} messages to the IE window during a mouse * hover. */ public InternetExplorerOptions enablePersistentHovering() { return amend(ENABLE_PERSISTENT_HOVERING, true); }
/** * Force the use of the Windows CreateProcess API when launching Internet Explorer. */ public InternetExplorerOptions useCreateProcessApiToLaunchIe() { return amend(FORCE_CREATE_PROCESS, true); }
/** * Use the Windows ShellWindows API when attaching to Internet Explorer. */ public InternetExplorerOptions useShellWindowsApiToAttachToIe() { return amend(FORCE_WINDOW_SHELL_API, true); }
/** * Use the {@link org.openqa.selenium.Proxy} defined in other {@link Capabilities} on a * per-process basis, not updating the system installed proxy setting. This is only valid when * setting a {@link org.openqa.selenium.Proxy} where the * {@link org.openqa.selenium.Proxy.ProxyType} is one of * <ul> * <li>{@link org.openqa.selenium.Proxy.ProxyType#DIRECT} * <li>{@link org.openqa.selenium.Proxy.ProxyType#MANUAL} * <li>{@link org.openqa.selenium.Proxy.ProxyType#SYSTEM} * </ul> */ public InternetExplorerOptions usePerProcessProxy() { return amend(IE_USE_PER_PROCESS_PROXY, true); }
public InternetExplorerOptions disableNativeEvents() { return amend(NATIVE_EVENTS, false); }
public InternetExplorerOptions setPageLoadStrategy(PageLoadStrategy strategy) { return amend(PAGE_LOAD_STRATEGY, strategy); }
public InternetExplorerOptions ignoreZoomSettings() { return amend(IGNORE_ZOOM_SETTING, true); }
public InternetExplorerOptions requireWindowFocus() { return amend(REQUIRE_WINDOW_FOCUS, true); }
public InternetExplorerOptions introduceFlakinessByIgnoringSecurityDomains() { return amend(INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true); }
public InternetExplorerOptions takeFullPageScreenshot() { return amend(FULL_PAGE_SCREENSHOT, true); }
public InternetExplorerOptions setUnhandledPromptBehaviour(UnexpectedAlertBehaviour behaviour) { return amend(UNHANDLED_PROMPT_BEHAVIOUR, behaviour); }
public InternetExplorerOptions withInitialBrowserUrl(String url) { return amend(INITIAL_BROWSER_URL, Preconditions.checkNotNull(url)); }
@Deprecated public InternetExplorerOptions enableNativeEvents() { return amend(NATIVE_EVENTS, true); }
public InternetExplorerOptions withAttachTimeout(Duration duration) { return amend(BROWSER_ATTACH_TIMEOUT, duration.toMillis()); }
public InternetExplorerOptions waitForUploadDialogUpTo(Duration duration) { return amend(UPLOAD_DIALOG_TIMEOUT, duration.toMillis()); }
public InternetExplorerOptions elementScrollTo(ElementScrollBehavior behavior) { return amend(ELEMENT_SCROLL_BEHAVIOR, behavior.getValue()); }
public InternetExplorerOptions addCommandSwitches(String... switches) { Object raw = getCapability(IE_SWITCHES); if (raw == null) { raw = new LinkedList<>(); } else if (raw instanceof String) { raw = Arrays.asList(((String) raw).split(" ")); } return amend( IE_SWITCHES, Streams.concat((Stream<?>) List.class.cast(raw).stream(), Stream.of(switches)) .filter(i -> i instanceof String) .map(String.class::cast) .collect(ImmutableList.toImmutableList())); }