Class InternetExplorerOptions
Class to manage options specific to InternetExplorerDriver
public class InternetExplorerOptions
- Inheritance
-
InternetExplorerOptions
- Inherited Members
Examples
InternetExplorerOptions options = new InternetExplorerOptions();
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
For use with InternetExplorerDriver:
InternetExplorerDriver driver = new InternetExplorerDriver(options);
For use with RemoteWebDriver:
RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities());
Constructors
InternetExplorerOptions()
public InternetExplorerOptions()
Properties
ElementScrollBehavior
Gets or sets the value for describing how elements are scrolled into view in the IE driver. Defaults to scrolling the element to the top of the viewport.
public InternetExplorerElementScrollBehavior ElementScrollBehavior { get; set; }
Property Value
EnableNativeEvents
Gets or sets a value indicating whether to use native events in interacting with elements.
public bool EnableNativeEvents { get; set; }
Property Value
EnablePersistentHover
Gets or sets a value indicating whether to enable persistently sending WM_MOUSEMOVE messages to the IE window during a mouse hover.
public bool EnablePersistentHover { get; set; }
Property Value
IgnoreZoomLevel
Gets or sets a value indicating whether to ignore the zoom level of Internet Explorer .
public bool IgnoreZoomLevel { get; set; }
Property Value
InitialBrowserUrl
Gets or sets the initial URL displayed when IE is launched. If not set, the browser launches with the internal startup page for the WebDriver server.
public string InitialBrowserUrl { get; set; }
Property Value
Remarks
By setting the IntroduceInstabilityByIgnoringProtectedModeSettings to true and this property to a correct URL, you can launch IE in the Internet Protected Mode zone. This can be helpful to avoid the flakiness introduced by ignoring the Protected Mode settings. Nevertheless, setting Protected Mode zone settings to the same value in the IE configuration is the preferred method.
IntroduceInstabilityByIgnoringProtectedModeSettings
Gets or sets a value indicating whether to ignore the settings of the Internet Explorer Protected Mode.
public bool IntroduceInstabilityByIgnoringProtectedModeSettings { get; set; }
Property Value
RequireWindowFocus
Gets or sets a value indicating whether to require the browser window to have focus before interacting with elements.
public bool RequireWindowFocus { get; set; }
Property Value
UnexpectedAlertBehavior
Gets or sets the value for describing how unexpected alerts are to be handled in the IE driver. Defaults to Default.
public InternetExplorerUnexpectedAlertBehavior UnexpectedAlertBehavior { get; set; }
Property Value
Methods
AddAdditionalCapability(string, object)
Provides a means to add additional capabilities not yet added as type safe options for the Internet Explorer driver.
public void AddAdditionalCapability(string capabilityName, object capabilityValue)
Parameters
capabilityName
stringThe name of the capability to add.
capabilityValue
objectThe value of the capability to add.
Remarks
Calling AddAdditionalCapability(string, object) where capabilityName
has already been added will overwrite the existing value with the new value in capabilityValue
Exceptions
- ArgumentException
thrown when attempting to add a capability for which there is already a type safe option, or when
capabilityName
is null or the empty string.
ToCapabilities()
Returns DesiredCapabilities for IE with these options included as capabilities. This copies the options. Further changes will not be reflected in the returned capabilities.
public ICapabilities ToCapabilities()
Returns
- ICapabilities
The DesiredCapabilities for IE with these options.