C# Класс 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.
Наследование: IWebDriver, ISearchContext, IJavaScriptExecutor, ITakesScreenshot
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
ExtractReturnValue ( SafeScriptResultHandle scriptResult ) : object
GetUnderlayingHandle ( ) : SafeInternetExplorerDriverHandle

Get the driver handle.

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

Wait for the load to complete.

Описание методов

Close() публичный Метод

Closes the Browser.
public Close ( ) : void
Результат void

Dispose() публичный Метод

Disposes of all unmanaged instances of InternetExplorerDriver.
public Dispose ( ) : void
Результат void

ExecuteScript() публичный Метод

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.
Результат object

FindElement() публичный Метод

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.
Результат IWebElement

FindElements() публичный Метод

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.
Результат ReadOnlyCollection

GetScreenshot() публичный Метод

Gets a Screenshot object representing the image of the page on the screen.
public GetScreenshot ( ) : Screenshot
Результат Screenshot

GetWindowHandle() публичный Метод

Returns the Name of Window that the driver is working in.
public GetWindowHandle ( ) : string
Результат string

GetWindowHandles() публичный Метод

Method for returning a collection of WindowHandles that the driver has access to.
public GetWindowHandles ( ) : ReadOnlyCollection
Результат ReadOnlyCollection

InternetExplorerDriver() публичный Метод

Initializes a new instance of the InternetExplorerDriver class.
public InternetExplorerDriver ( ) : System
Результат System

Manage() публичный Метод

Method For getting an object to set the Speed.
public Manage ( ) : IOptions
Результат IOptions

Navigate() публичный Метод

Method to allow you to Navigate with WebDriver.
public Navigate ( ) : INavigation
Результат INavigation

Quit() публичный Метод

Close the Browser and Dispose of WebDriver.
public Quit ( ) : void
Результат void

SwitchTo() публичный Метод

Method to give you access to switch frames and windows.
public SwitchTo ( ) : ITargetLocator
Результат ITargetLocator