C# Class TestAutomationEssentials.Selenium.Browser

Represents an instance of a browser
Inheritance: ElementsContainer, IDOMRoot
Show file Open project: arnonax/TestEssentials Class Usage Examples

Protected Properties

Property Type Description
WebDriver IWebDriver

Private Properties

Property Type Description
CheckDisposed void
IDOMRoot void

Public Methods

Method Description
Browser ( string description, IWebDriver webDriver ) : System

Initializes the instance of the object using the specified description and IWebDriver

Dispose ( ) : void

Closes the Selenium driver

GetWebDriver ( ) : IWebDriver

Returns the underlying IWebDriver object

NavigateToUrl ( string url ) : void

Navigates the main window to the specified url

OpenWindow ( Action action, string windowDescription ) : BrowserWindow

Invokes a delegate that causes a new window to open, and return an object representing the new window

When the current IIsolationScope ends, the window is automatically closed

Protected Methods

Method Description
Activate ( ) : void

Private Methods

Method Description
CheckDisposed ( ) : void
IDOMRoot ( ) : void

Method Details

Activate() protected final method

protected final Activate ( ) : void
return void

Browser() public method

Initializes the instance of the object using the specified description and IWebDriver
one of the arguments are null
public Browser ( string description, IWebDriver webDriver ) : System
description string The description of the browser. This is used for logging
webDriver IWebDriver The WebDriver instance that is used to communicate with the browser
return System

Dispose() public method

Closes the Selenium driver
public Dispose ( ) : void
return void

GetWebDriver() public method

Returns the underlying IWebDriver object
public GetWebDriver ( ) : IWebDriver
return IWebDriver

NavigateToUrl() public method

Navigates the main window to the specified url
public NavigateToUrl ( string url ) : void
url string The url to navigate to
return void

OpenWindow() public method

Invokes a delegate that causes a new window to open, and return an object representing the new window
When the current IIsolationScope ends, the window is automatically closed
or are null A new window wasn't opened for 60 seconds after the delegate completed
public OpenWindow ( Action action, string windowDescription ) : BrowserWindow
action Action The delegate that should cause a new window to open
windowDescription string A description that will identify the window in the log
return BrowserWindow

Property Details

WebDriver protected property

Provides access to the underlying IWebDriver
protected IWebDriver WebDriver
return IWebDriver