A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://seleniumhq.github.io/selenium/docs/api/dotnet/webdriver/OpenQA.Selenium.ITargetLocator.html below:

Interface ITargetLocator

Interface ITargetLocator
Namespace
OpenQA.Selenium
Assembly
WebDriver.dll

Defines the interface through which the user can locate a given frame or window.

public interface ITargetLocator
Methods ActiveElement()

Switches to the element that currently has the focus, or the body element if no element with focus can be detected.

IWebElement ActiveElement()
Returns
IWebElement

An IWebElement instance representing the element with the focus, or the body element if no element with focus can be detected.

Alert()

Switches to the currently active modal dialog for this particular driver instance.

Returns
IAlert

A handle to the dialog.

DefaultContent()

Selects either the first frame on the page or the main document when a page contains iFrames.

IWebDriver DefaultContent()
Returns
IWebDriver

An IWebDriver instance focused on the default frame.

Frame(IWebElement)

Select a frame using its previously located IWebElement

IWebDriver Frame(IWebElement frameElement)
Parameters
frameElement IWebElement

The frame element to switch to.

Returns
IWebDriver

An IWebDriver instance focused on the specified frame.

Exceptions
NoSuchFrameException

If the element is neither a FRAME nor an IFRAME element.

StaleElementReferenceException

If the element is no longer valid.

ArgumentNullException

If frameElement is null.

ArgumentException

If frameElement cannot be converted to an OpenQA.Selenium.Internal.IWebDriverObjectReference.

Frame(int)

Select a frame by its (zero-based) index.

IWebDriver Frame(int frameIndex)
Parameters
frameIndex int

The zero-based index of the frame to select.

Returns
IWebDriver

An IWebDriver instance focused on the specified frame.

Exceptions
NoSuchFrameException

If the frame cannot be found.

Frame(string)

Select a frame by its name or ID.

IWebDriver Frame(string frameName)
Parameters
frameName string

The name of the frame to select.

Returns
IWebDriver

An IWebDriver instance focused on the specified frame.

Exceptions
NoSuchFrameException

If the frame cannot be found.

ArgumentNullException

If frameName is null.

NewWindow(WindowType)

Creates a new browser window and switches the focus for future commands of this driver to the new window.

IWebDriver NewWindow(WindowType typeHint)
Parameters
typeHint WindowType

The type of new browser window to be created. The created window is not guaranteed to be of the requested type; if the driver does not support the requested type, a new browser window will be created of whatever type the driver does support.

Returns
IWebDriver

An IWebDriver instance focused on the new browser.

ParentFrame()

Select the parent frame of the currently selected frame.

Returns
IWebDriver

An IWebDriver instance focused on the specified frame.

Window(string)

Switches the focus of future commands for this driver to the window with the given name.

IWebDriver Window(string windowName)
Parameters
windowName string

The name of the window to select.

Returns
IWebDriver

An IWebDriver instance focused on the given window.

Exceptions
NoSuchWindowException

If the window cannot be found.

ArgumentNullException

If windowName is null.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4