The parent driver.
Schedules a command retrieve the {@code document.activeElement} element on the current document, or {@code document.body} if activeElement is not available.
The active element.
Schedules a command to change focus to the active modal dialog, such as
those opened by window.alert()
, window.confirm()
, and
window.prompt()
. The returned promise will be rejected with a
error.NoSuchAlertError if there are no open alerts.
The open alert.
Changes the focus of all future commands to another frame on the page. The target frame may be specified as one of the following:
frame
or iframe
DOM element.null
value, to select the topmost frame on the page. Passing null
is the same as calling #defaultContent defaultContent().If the specified frame can not be found, the returned promise will be rejected with a error.NoSuchFrameError.
The frame locator.
A promise that will be resolved when the driver has changed focus to the specified frame.
Creates a new browser window and switches the focus for future commands of this driver to the new window.
'window' or 'tab'. 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.
A promise that will be resolved when the driver has changed focus to the new window.
Changes the focus of all future commands to the parent frame of the currently selected frame. This command has no effect if the driver is already focused on the top-level browsing context.
A promise that will be resolved when the command has completed.
Schedules a command to switch the focus of all future commands to another window. Windows may be specified by their {@code window.name} attribute or by its handle (as returned by WebDriver#getWindowHandles).
If the specified window cannot be found, the returned promise will be rejected with a error.NoSuchWindowError.
The name or window handle of the window to switch focus to.
A promise that will be resolved when the driver has changed focus to the specified window.
Generated using TypeDoc
An interface for changing the focus of the driver to another frame or window.