class RemoteTargetLocator implements WebDriverTargetLocator (View source)

Used to locate a given frame or window for RemoteWebDriver.

Properties

protected RemoteExecuteMethod $executor
protected RemoteWebDriver $driver
protected bool $isW3cCompliant

Methods

__construct(RemoteExecuteMethod $executor, RemoteWebDriver $driver, $isW3cCompliant = false)

No description

defaultContent()

No description

frame(WebDriverElement|null|int|string $frame)

No description

parent()

Switch to the parent iframe.

window(string $handle)

No description

newWindow(string $windowType = self::WINDOW_TYPE_TAB)

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

alert()

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

activeElement()

No description

Details

__construct(RemoteExecuteMethod $executor, RemoteWebDriver $driver, $isW3cCompliant = false)

No description

Parameters

RemoteExecuteMethod $executor
RemoteWebDriver $driver
$isW3cCompliant

WebDriver defaultContent()

No description

Return Value

WebDriver

The driver focused on the top window or the first frame.

WebDriver frame(WebDriverElement|null|int|string $frame)

No description

Parameters

WebDriverElement|null|int|string $frame

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 Value

WebDriver

The driver focused on the given frame.

RemoteWebDriver parent()

Switch to the parent iframe.

Return Value

RemoteWebDriver

This driver focused on the parent frame

WebDriver window(string $handle)

No description

Parameters

string $handle

The handle of the window to be focused on.

Return Value

WebDriver

The driver focused on the given window.

RemoteWebDriver newWindow(string $windowType = self::WINDOW_TYPE_TAB)

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

Parameters

string $windowType

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.

Return Value

RemoteWebDriver

This driver focused on the given window

Exceptions

LogicException

See also

https://w3c.github.io/webdriver/#new-window

WebDriverAlert alert()

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

Return Value

WebDriverAlert

WebDriverElement activeElement()

No description

Return Value

WebDriverElement