RemoteTargetLocator
in package
implements
WebDriverTargetLocator
Used to locate a given frame or window for RemoteWebDriver.
Table of Contents
Interfaces
- WebDriverTargetLocator
- Used to locate a given frame or window.
Properties
Methods
- __construct() : mixed
- activeElement() : RemoteWebElement
- Switches to the element that currently has focus within the document currently "switched to", or the body element if this cannot be detected.
- alert() : WebDriverAlert
- Switch to the currently active modal dialog for this particular driver instance.
- defaultContent() : RemoteWebDriver
- Set the current browsing context to the current top-level browsing context.
- frame() : RemoteWebDriver
- Switch to the iframe by its id or name.
- newWindow() : RemoteWebDriver
- Creates a new browser window and switches the focus for future commands of this driver to the new window.
- parent() : RemoteWebDriver
- Switch to the parent iframe.
- window() : RemoteWebDriver
- Switch the focus to another window by its handle.
Properties
$driver
protected
RemoteWebDriver
$driver
$executor
protected
RemoteExecuteMethod
$executor
$isW3cCompliant
protected
bool
$isW3cCompliant
Methods
__construct()
public
__construct(RemoteExecuteMethod $executor, RemoteWebDriver $driver[, mixed $isW3cCompliant = false ]) : mixed
Parameters
- $executor : RemoteExecuteMethod
- $driver : RemoteWebDriver
- $isW3cCompliant : mixed = false
activeElement()
Switches to the element that currently has focus within the document currently "switched to", or the body element if this cannot be detected.
public
activeElement() : RemoteWebElement
Return values
RemoteWebElementalert()
Switch to the currently active modal dialog for this particular driver instance.
public
alert() : WebDriverAlert
Return values
WebDriverAlertdefaultContent()
Set the current browsing context to the current top-level browsing context.
public
defaultContent() : RemoteWebDriver
Return values
RemoteWebDriverframe()
Switch to the iframe by its id or name.
public
frame(WebDriverElement|null|int|string $frame) : RemoteWebDriver
Parameters
- $frame : WebDriverElement|null|int|string
-
The WebDriverElement, the id or the name of the frame. When null, switch to the current top-level browsing context When int, switch to the WindowProxy identified by the value. When an Element, switch to that Element.
Return values
RemoteWebDrivernewWindow()
Creates a new browser window and switches the focus for future commands of this driver to the new window.
public
newWindow([string $windowType = self::WINDOW_TYPE_TAB ]) : RemoteWebDriver
Parameters
- $windowType : string = self::WINDOW_TYPE_TAB
-
The type of a new browser window that should be created. One of [tab, window]. 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.
Tags
Return values
RemoteWebDriver —This driver focused on the given window
parent()
Switch to the parent iframe.
public
parent() : RemoteWebDriver
Return values
RemoteWebDriver —This driver focused on the parent frame
window()
Switch the focus to another window by its handle.
public
window(string $handle) : RemoteWebDriver
Parameters
- $handle : string
-
The handle of the window to be focused on.