C# Class OpenQA.Selenium.IE.InternetExplorerDriver

Provides a way to access Internet Explorer to run your tests by creating a InternetExplorerDriver instance
When the WebDriver object has been instantiated the browser will load. The test can then navigate to the URL under test and start your test.
Inheritance: IWebDriver, ISearchContext, IJavaScriptExecutor, ITakesScreenshot
Afficher le fichier Open project: epall/selenium Class Usage Examples

Méthodes publiques

Méthode Description
Close ( ) : void

Closes the Browser.

Dispose ( ) : void

Disposes of all unmanaged instances of InternetExplorerDriver.

ExecuteScript ( string script ) : object

Executes JavaScript in the context of the currently selected frame or window.

The ExecuteScriptmethod executes JavaScript in the context of the currently selected frame or window. This means that "document" will refer to the current document. If the script has a return value, then the following steps will be taken:

For an HTML element, this method returns a IWebElement For a number, a System.Int64 is returned For a boolean, a System.Boolean is returned For all other cases a System.String is returned. For an array,we check the first element, and attempt to return a List{T} of that type, following the rules above. Nested lists are not supported. If the value is null or there is no return value, is returned.

Arguments must be a number (which will be converted to a System.Int64), a System.Boolean, a System.String or a IWebElement. An exception will be thrown if the arguments do not meet these criteria. The arguments will be made available to the JavaScript via the "arguments" magic variable, as if the function were called via "Function.apply"

FindElement ( By by ) : IWebElement

Finds the first element in the page that matches the By object.

FindElements ( By by ) : ReadOnlyCollection

Finds the elements on the page by using the By object and returns a ReadOnlyCollection of the Elements on the page.

GetScreenshot ( ) : Screenshot

Gets a Screenshot object representing the image of the page on the screen.

GetWindowHandle ( ) : string

Returns the Name of Window that the driver is working in.

GetWindowHandles ( ) : ReadOnlyCollection

Method for returning a collection of WindowHandles that the driver has access to.

InternetExplorerDriver ( ) : System

Initializes a new instance of the InternetExplorerDriver class.

Manage ( ) : IOptions

Method For getting an object to set the Speed.

Navigate ( ) : INavigation

Method to allow you to Navigate with WebDriver.

Quit ( ) : void

Close the Browser and Dispose of WebDriver.

SwitchTo ( ) : ITargetLocator

Method to give you access to switch frames and windows.

Private Methods

Méthode Description
ExtractReturnValue ( SafeScriptResultHandle scriptResult ) : object
GetUnderlayingHandle ( ) : SafeInternetExplorerDriverHandle

Get the driver handle.

PopulateArguments ( SafeScriptArgsHandle scriptArgs, object args ) : WebDriverResult
WaitForLoadToComplete ( ) : void

Wait for the load to complete.

Method Details

Close() public méthode

Closes the Browser.
public Close ( ) : void
Résultat void

Dispose() public méthode

Disposes of all unmanaged instances of InternetExplorerDriver.
public Dispose ( ) : void
Résultat void

ExecuteScript() public méthode

Executes JavaScript in the context of the currently selected frame or window.

The ExecuteScriptmethod executes JavaScript in the context of the currently selected frame or window. This means that "document" will refer to the current document. If the script has a return value, then the following steps will be taken:

For an HTML element, this method returns a IWebElement For a number, a System.Int64 is returned For a boolean, a System.Boolean is returned For all other cases a System.String is returned. For an array,we check the first element, and attempt to return a List{T} of that type, following the rules above. Nested lists are not supported. If the value is null or there is no return value, is returned.

Arguments must be a number (which will be converted to a System.Int64), a System.Boolean, a System.String or a IWebElement. An exception will be thrown if the arguments do not meet these criteria. The arguments will be made available to the JavaScript via the "arguments" magic variable, as if the function were called via "Function.apply"

public ExecuteScript ( string script ) : object
script string The JavaScript code to execute.
Résultat object

FindElement() public méthode

Finds the first element in the page that matches the By object.
public FindElement ( By by ) : IWebElement
by By By mechanism for finding the element.
Résultat IWebElement

FindElements() public méthode

Finds the elements on the page by using the By object and returns a ReadOnlyCollection of the Elements on the page.
public FindElements ( By by ) : ReadOnlyCollection
by By By mechanism for finding the element.
Résultat ReadOnlyCollection

GetScreenshot() public méthode

Gets a Screenshot object representing the image of the page on the screen.
public GetScreenshot ( ) : Screenshot
Résultat Screenshot

GetWindowHandle() public méthode

Returns the Name of Window that the driver is working in.
public GetWindowHandle ( ) : string
Résultat string

GetWindowHandles() public méthode

Method for returning a collection of WindowHandles that the driver has access to.
public GetWindowHandles ( ) : ReadOnlyCollection
Résultat ReadOnlyCollection

InternetExplorerDriver() public méthode

Initializes a new instance of the InternetExplorerDriver class.
public InternetExplorerDriver ( ) : System
Résultat System

Manage() public méthode

Method For getting an object to set the Speed.
public Manage ( ) : IOptions
Résultat IOptions

Navigate() public méthode

Method to allow you to Navigate with WebDriver.
public Navigate ( ) : INavigation
Résultat INavigation

Quit() public méthode

Close the Browser and Dispose of WebDriver.
public Quit ( ) : void
Résultat void

SwitchTo() public méthode

Method to give you access to switch frames and windows.
public SwitchTo ( ) : ITargetLocator
Résultat ITargetLocator