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
An IWebElement instance representing the element with the focus, or the body element if no element with focus can be detected.
Switches to the currently active modal dialog for this particular driver instance.
ReturnsA handle to the dialog.
Selects either the first frame on the page or the main document when a page contains iFrames.
IWebDriver DefaultContent()
Returns
An IWebDriver instance focused on the default frame.
Select a frame using its previously located IWebElement
IWebDriver Frame(IWebElement frameElement)
Parameters
frameElement
IWebElement
The frame element to switch to.
An IWebDriver instance focused on the specified frame.
If the element is neither a FRAME nor an IFRAME element.
If the element is no longer valid.
If frameElement
is null.
If frameElement
cannot be converted to an OpenQA.Selenium.Internal.IWebDriverObjectReference.
Select a frame by its (zero-based) index.
IWebDriver Frame(int frameIndex)
Parameters
frameIndex
int
The zero-based index of the frame to select.
An IWebDriver instance focused on the specified frame.
If the frame cannot be found.
Select a frame by its name or ID.
IWebDriver Frame(string frameName)
Parameters
frameName
string
The name of the frame to select.
An IWebDriver instance focused on the specified frame.
If the frame cannot be found.
If frameName
is null.
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.
An IWebDriver instance focused on the new browser.
Select the parent frame of the currently selected frame.
ReturnsAn IWebDriver instance focused on the specified frame.
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.
An IWebDriver instance focused on the given window.
If the window cannot be found.
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