Powered By Blogger

Search Here!

Saturday, June 8, 2013

Internet Explorer Options : Selenium !

org.openqa.selenium.ie.InternetExplorerDriver

Capabilities [{platform=WINDOWS, elementScrollBehavior=0, javascriptEnabled=true, enablePersistentHover=true, ignoreZoomSetting=false, browserName=internet explorer, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss, version=9, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, allowAsynchronousJavaScript=true, requireWindowFocus=false, handlesAlerts=true, initialBrowserUrl=, nativeEvents=true, takesScreenshot=true}]

InternetExplorerOptions options = new InternetExplorerOptions
                                                  {
                                                      IntroduceInstabilityByIgnoringProtectedModeSettings = true,
                                                      UnexpectedAlertBehavior = InternetExplorerUnexpectedAlertBehavior.Ignore,
                                                      IgnoreZoomLevel = true,
                                                      EnableNativeEvents = true,
                                                      RequireWindowFocus = true,
                                                      EnablePersistentHover = true,
                                                      ElementScrollBehavior = InternetExplorerElementScrollBehavior.Top,
                                                      BrowserAttachTimeout = TimeSpan.FromSeconds(timeOut),
                                                  };
 IWebDriver webDriver = new InternetExplorerDriver(ieDriverPath, options, TimeSpan.FromMinutes(20));

Properties Description

Name
Description
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.
EnableNativeEvents
Gets or sets a value indicating whether to use native events in interacting with elements.
EnablePersistentHover
Gets or sets a value indicating whether to enable persistently sending WM_MOUSEMOVE messages to the IE window during a mouse hover.
IgnoreZoomLevel
Gets or sets a value indicating whether to ignore the zoom level of Internet Explorer .
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.
IntroduceInstabilityByIgnoringProtectedModeSettings
Gets or sets a value indicating whether to ignore the settings of the Internet Explorer Protected Mode.
RequireWindowFocus
Gets or sets a value indicating whether to require the browser window to have focus before interacting with elements.
UnexpectedAlertBehavior
Gets or sets the value for describing how unexpected alerts are to be handled in the IE driver. Defaults to Default.

No comments:

Post a Comment