From e7b0437b0d9353e1722d26368e613d1fff15691d Mon Sep 17 00:00:00 2001 From: Selenium CI Bot Date: Sat, 22 Mar 2025 00:00:27 +0000 Subject: [PATCH] [create-pull-request] automated change --- docs/api/javascript/Action.html | 2 +- docs/api/javascript/Actions.html | 4 +- docs/api/javascript/Alert.html | 2 +- docs/api/javascript/AlertPromise.html | 4 +- docs/api/javascript/ArgumentValue.html | 2 +- docs/api/javascript/BaseLogEntry.html | 2 +- docs/api/javascript/BaseParameters.html | 2 +- docs/api/javascript/BeforeRequestSent.html | 2 +- docs/api/javascript/BoxClipRectangle.html | 2 +- docs/api/javascript/BrowsingContext.html | 2 +- docs/api/javascript/BrowsingContextInfo.html | 2 +- .../javascript/BrowsingContextInspector.html | 2 +- .../BrowsingContextPartitionDescriptor.html | 2 +- docs/api/javascript/Build.html | 2 +- docs/api/javascript/Builder.html | 4 +- docs/api/javascript/By.html | 2 +- docs/api/javascript/BytesValue.html | 2 +- docs/api/javascript/Capabilities.html | 2 +- .../CaptureScreenshotParameters.html | 2 +- docs/api/javascript/ChannelValue.html | 2 +- docs/api/javascript/Client.html | 2 +- docs/api/javascript/ClientWindowInfo.html | 3 + docs/api/javascript/ClipRectangle.html | 2 +- docs/api/javascript/Command.html | 2 +- docs/api/javascript/Condition.html | 2 +- docs/api/javascript/ConsoleLogEntry.html | 2 +- .../javascript/ContinueRequestParameters.html | 2 +- .../ContinueResponseParameters.html | 2 +- docs/api/javascript/Cookie.html | 2 +- docs/api/javascript/CookieFilter.html | 2 +- .../javascript/CreateContextParameters.html | 2 +- docs/api/javascript/Credential.html | 2 +- .../javascript/DetachedShadowRootError.html | 2 +- docs/api/javascript/Device.html | 2 +- .../api/javascript/DriverService.Builder.html | 2 +- docs/api/javascript/DriverService.html | 2 +- .../ElementClickInterceptedError.html | 2 +- docs/api/javascript/ElementClipRectangle.html | 2 +- .../ElementNotInteractableError.html | 2 +- .../javascript/ElementNotSelectableError.html | 2 +- docs/api/javascript/Entry.html | 2 +- docs/api/javascript/Environment.html | 2 +- .../javascript/EvaluateResultException.html | 2 +- .../api/javascript/EvaluateResultSuccess.html | 2 +- docs/api/javascript/ExceptionDetails.html | 2 +- docs/api/javascript/Executor.html | 2 +- docs/api/javascript/FetchError.html | 2 +- docs/api/javascript/FetchTimingInfo.html | 2 +- docs/api/javascript/FileDetector.html | 2 +- docs/api/javascript/GenericLogEntry.html | 2 +- docs/api/javascript/Header.html | 2 +- docs/api/javascript/HttpClient.html | 2 +- docs/api/javascript/HttpResponse.html | 2 +- docs/api/javascript/ISelect.html | 2 +- docs/api/javascript/IWebDriver.html | 4 +- docs/api/javascript/Index_.html | 2 +- docs/api/javascript/Initiator.html | 2 +- docs/api/javascript/Input.html | 2 +- .../javascript/InsecureCertificateError.html | 2 +- docs/api/javascript/InvalidArgumentError.html | 2 +- .../api/javascript/InvalidCharacterError.html | 2 +- .../javascript/InvalidCookieDomainError.html | 2 +- .../javascript/InvalidCoordinatesError.html | 2 +- .../javascript/InvalidElementStateError.html | 2 +- docs/api/javascript/InvalidSelectorError.html | 2 +- docs/api/javascript/JavascriptError.html | 2 +- docs/api/javascript/JavascriptLogEntry.html | 2 +- docs/api/javascript/Keyboard.html | 2 +- docs/api/javascript/Level.html | 2 +- docs/api/javascript/LocalValue.html | 2 +- docs/api/javascript/Locator.html | 2 +- docs/api/javascript/LogManager.html | 2 +- docs/api/javascript/Logger.html | 2 +- docs/api/javascript/Message.html | 2 +- .../MoveTargetOutOfBoundsError.html | 2 +- docs/api/javascript/NavigateResult.html | 2 +- docs/api/javascript/NavigationInfo.html | 2 +- docs/api/javascript/Network.html | 2 +- docs/api/javascript/NetworkInspector.html | 2 +- docs/api/javascript/NoSuchAlertError.html | 2 +- docs/api/javascript/NoSuchCookieError.html | 2 +- docs/api/javascript/NoSuchElementError.html | 2 +- docs/api/javascript/NoSuchFrameError.html | 2 +- docs/api/javascript/NoSuchSessionError.html | 2 +- .../api/javascript/NoSuchShadowRootError.html | 2 +- docs/api/javascript/NoSuchWindowError.html | 2 +- docs/api/javascript/Options.Cookie.html | 2 +- docs/api/javascript/Options.html | 4 +- docs/api/javascript/PartialCookie.html | 2 +- docs/api/javascript/PartitionDescriptor.html | 2 +- docs/api/javascript/PartitionKey.html | 2 +- docs/api/javascript/Pointer.html | 2 +- docs/api/javascript/Preferences.html | 2 +- docs/api/javascript/PrintResult.html | 2 +- .../javascript/ProvideResponseParameters.html | 2 +- docs/api/javascript/RealmInfo.html | 2 +- docs/api/javascript/ReferenceValue.html | 2 +- docs/api/javascript/RegExpValue.html | 2 +- docs/api/javascript/RelativeBy.html | 2 +- docs/api/javascript/RemoteValue.html | 2 +- docs/api/javascript/Request.html | 2 +- docs/api/javascript/RequestData.html | 2 +- docs/api/javascript/Response.html | 2 +- docs/api/javascript/ResponseData.html | 2 +- docs/api/javascript/ResponseStarted.html | 2 +- docs/api/javascript/Result.html | 2 +- docs/api/javascript/ScriptManager.html | 2 +- docs/api/javascript/ScriptTimeoutError.html | 2 +- docs/api/javascript/Select.html | 2 +- .../javascript/SeleniumServer.Options.html | 2 +- docs/api/javascript/SeleniumServer.html | 2 +- docs/api/javascript/SerializationOptions.html | 2 +- docs/api/javascript/Server.html | 2 +- docs/api/javascript/ServiceOptions.html | 2 +- docs/api/javascript/Session.html | 2 +- .../javascript/SessionNotCreatedError.html | 2 +- docs/api/javascript/ShadowRoot.html | 4 +- docs/api/javascript/ShadowRootPromise.html | 2 +- docs/api/javascript/Source.html | 2 +- .../StaleElementReferenceError.html | 2 +- docs/api/javascript/Storage.html | 2 +- .../StorageKeyPartitionDescriptor.html | 2 +- docs/api/javascript/SuiteOptions.html | 2 +- docs/api/javascript/TargetBrowser.html | 2 +- docs/api/javascript/ThenableWebDriver.html | 4 +- docs/api/javascript/TimeoutError.html | 2 +- docs/api/javascript/Timeouts.html | 2 +- .../UnableToCaptureScreenError.html | 2 +- .../javascript/UnableToSetCookieError.html | 2 +- .../javascript/UnexpectedAlertOpenError.html | 2 +- docs/api/javascript/UnknownCommandError.html | 2 +- docs/api/javascript/UnknownMethodError.html | 2 +- .../javascript/UnsupportedOperationError.html | 2 +- docs/api/javascript/UrlPattern.html | 2 +- .../VirtualAuthenticatorOptions.html | 2 +- docs/api/javascript/WebDriver.html | 6 +- docs/api/javascript/WebDriverError.html | 2 +- docs/api/javascript/WebElement.html | 8 +- docs/api/javascript/WebElementCondition.html | 2 +- docs/api/javascript/WebElementPromise.html | 4 +- docs/api/javascript/Wheel.html | 2 +- docs/api/javascript/WindowRealmInfo.html | 2 +- docs/api/javascript/Zip.html | 2 +- .../bidi_addInterceptParameters.js.html | 4 +- .../api/javascript/bidi_argumentValue.js.html | 4 +- docs/api/javascript/bidi_browser.js.html | 21 ++++- .../javascript/bidi_browsingContext.js.html | 4 +- .../bidi_browsingContextInspector.js.html | 4 +- .../bidi_browsingContextTypes.js.html | 4 +- .../bidi_captureScreenshotParameters.js.html | 4 +- .../javascript/bidi_clientWindowInfo.js.html | 57 ++++++++++++++ .../api/javascript/bidi_clipRectangle.js.html | 4 +- .../bidi_continueRequestParameters.js.html | 4 +- .../bidi_continueResponseParameters.js.html | 4 +- docs/api/javascript/bidi_cookieFilter.js.html | 4 +- .../bidi_createContextParameters.js.html | 4 +- .../javascript/bidi_evaluateResult.js.html | 4 +- .../bidi_external_permissions.js.html | 76 +++++++++++++++++++ docs/api/javascript/bidi_index.js.html | 4 +- docs/api/javascript/bidi_input.js.html | 4 +- .../javascript/bidi_interceptPhase.js.html | 4 +- docs/api/javascript/bidi_logEntries.js.html | 4 +- docs/api/javascript/bidi_logInspector.js.html | 4 +- docs/api/javascript/bidi_network.js.html | 45 ++++++++++- .../javascript/bidi_networkInspector.js.html | 4 +- docs/api/javascript/bidi_networkTypes.js.html | 4 +- .../api/javascript/bidi_partialCookie.js.html | 4 +- .../bidi_partitionDescriptor.js.html | 4 +- docs/api/javascript/bidi_partitionKey.js.html | 4 +- docs/api/javascript/bidi_protocolType.js.html | 4 +- .../api/javascript/bidi_protocolValue.js.html | 4 +- .../bidi_provideResponseParameters.js.html | 4 +- docs/api/javascript/bidi_realmInfo.js.html | 4 +- .../javascript/bidi_resultOwnership.js.html | 4 +- .../api/javascript/bidi_scriptManager.js.html | 4 +- docs/api/javascript/bidi_scriptTypes.js.html | 4 +- docs/api/javascript/bidi_storage.js.html | 4 +- docs/api/javascript/bidi_urlPattern.js.html | 4 +- docs/api/javascript/chrome.js.html | 4 +- docs/api/javascript/chromium.js.html | 4 +- .../javascript/common_driverFinder.js.html | 4 +- .../javascript/common_seleniumManager.js.html | 4 +- .../createDriver-thenableWebDriverProxy.html | 2 +- docs/api/javascript/data/search.json | 2 +- .../devtools_networkinterceptor.js.html | 4 +- docs/api/javascript/edge.js.html | 4 +- docs/api/javascript/firefox.js.html | 4 +- docs/api/javascript/global.html | 6 +- docs/api/javascript/global.html#Browser | 2 +- docs/api/javascript/global.html#Config | 2 +- docs/api/javascript/global.html#ManualConfig | 2 +- docs/api/javascript/global.html#PacConfig | 2 +- docs/api/javascript/http_index.js.html | 4 +- docs/api/javascript/http_util.js.html | 4 +- docs/api/javascript/ie.js.html | 4 +- docs/api/javascript/index.html | 4 +- docs/api/javascript/index.js.html | 4 +- docs/api/javascript/io_exec.js.html | 4 +- docs/api/javascript/io_index.js.html | 4 +- docs/api/javascript/io_zip.js.html | 4 +- docs/api/javascript/lib_by.js.html | 4 +- docs/api/javascript/lib_capabilities.js.html | 4 +- docs/api/javascript/lib_command.js.html | 4 +- docs/api/javascript/lib_error.js.html | 4 +- docs/api/javascript/lib_http.js.html | 4 +- docs/api/javascript/lib_input.js.html | 4 +- docs/api/javascript/lib_logging.js.html | 4 +- docs/api/javascript/lib_promise.js.html | 4 +- docs/api/javascript/lib_proxy.js.html | 4 +- docs/api/javascript/lib_select.js.html | 4 +- docs/api/javascript/lib_session.js.html | 4 +- docs/api/javascript/lib_symbols.js.html | 4 +- docs/api/javascript/lib_test_build.js.html | 4 +- .../javascript/lib_test_fileserver.js.html | 4 +- .../javascript/lib_test_httpserver.js.html | 4 +- docs/api/javascript/lib_test_index.js.html | 4 +- .../api/javascript/lib_test_resources.js.html | 4 +- docs/api/javascript/lib_until.js.html | 4 +- docs/api/javascript/lib_util.js.html | 4 +- .../lib_virtual_authenticator.js.html | 4 +- docs/api/javascript/lib_webdriver.js.html | 14 +--- docs/api/javascript/lib_webelement.js.html | 4 +- ...dule-selenium-webdriver_chrome-Driver.html | 2 +- ...ule-selenium-webdriver_chrome-Options.html | 2 +- ...enium-webdriver_chrome-ServiceBuilder.html | 2 +- .../module-selenium-webdriver_chrome.html | 4 +- ...le-selenium-webdriver_chromium-Driver.html | 2 +- ...elenium-webdriver_chromium-Extensions.html | 2 +- ...e-selenium-webdriver_chromium-Options.html | 4 +- ...ium-webdriver_chromium-ServiceBuilder.html | 2 +- .../module-selenium-webdriver_chromium.html | 4 +- ...module-selenium-webdriver_edge-Driver.html | 2 +- ...odule-selenium-webdriver_edge-Options.html | 2 +- ...elenium-webdriver_edge-ServiceBuilder.html | 2 +- .../module-selenium-webdriver_edge.html | 4 +- ...um-webdriver_firefox-AddonFormatError.html | 2 +- ...le-selenium-webdriver_firefox-Channel.html | 2 +- ...ule-selenium-webdriver_firefox-Driver.html | 2 +- ...le-selenium-webdriver_firefox-Options.html | 2 +- ...nium-webdriver_firefox-ServiceBuilder.html | 2 +- .../module-selenium-webdriver_firefox.html | 4 +- .../module-selenium-webdriver_ie-Driver.html | 2 +- .../module-selenium-webdriver_ie-Options.html | 2 +- ...-selenium-webdriver_ie-ServiceBuilder.html | 2 +- .../module-selenium-webdriver_ie.html | 2 +- ...dule-selenium-webdriver_safari-Driver.html | 4 +- ...ule-selenium-webdriver_safari-Options.html | 2 +- ...enium-webdriver_safari-ServiceBuilder.html | 2 +- .../module-selenium-webdriver_safari.html | 2 +- docs/api/javascript/net_index.js.html | 4 +- docs/api/javascript/net_portprober.js.html | 4 +- docs/api/javascript/proxy.js.html | 4 +- docs/api/javascript/remote_index.js.html | 4 +- docs/api/javascript/remote_util.js.html | 4 +- docs/api/javascript/safari.js.html | 4 +- .../javascript/test_driver_factory.js.html | 4 +- .../test_virtualAuthenticator_test.js.html | 4 +- docs/api/javascript/testing_index.js.html | 4 +- 258 files changed, 550 insertions(+), 364 deletions(-) create mode 100644 docs/api/javascript/ClientWindowInfo.html create mode 100644 docs/api/javascript/bidi_clientWindowInfo.js.html create mode 100644 docs/api/javascript/bidi_external_permissions.js.html diff --git a/docs/api/javascript/Action.html b/docs/api/javascript/Action.html index 6b9db823594f5..266ec4009a3f4 100644 --- a/docs/api/javascript/Action.html +++ b/docs/api/javascript/Action.html @@ -1,3 +1,3 @@ Interface: Action
On this page

Action

Generic description of a single action to send to the remote end.

Members

button :Button|undefined

Type:

duration :number|undefined

Type:
  • number | undefined

(non-null) type :Action.Type

value :string|undefined

Type:
  • string | undefined

x :number|undefined

Type:
  • number | undefined

y :number|undefined

Type:
  • number | undefined

(package, static) Type :string

Type:
  • string
Properties
NameTypeDescription
KEY_DOWNstring
KEY_UPstring
PAUSEstring
POINTER_DOWNstring
POINTER_UPstring
POINTER_MOVEstring
POINTER_CANCELstring
SCROLLstring
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Action

Generic description of a single action to send to the remote end.

Members

button :Button|undefined

Type:

duration :number|undefined

Type:
  • number | undefined

(non-null) type :Action.Type

value :string|undefined

Type:
  • string | undefined

x :number|undefined

Type:
  • number | undefined

y :number|undefined

Type:
  • number | undefined

(package, static) Type :string

Type:
  • string
Properties
NameTypeDescription
KEY_DOWNstring
KEY_UPstring
PAUSEstring
POINTER_DOWNstring
POINTER_UPstring
POINTER_MOVEstring
POINTER_CANCELstring
SCROLLstring
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Actions.html b/docs/api/javascript/Actions.html index b61c6ed6f681c..9807a5f3b7ef2 100644 --- a/docs/api/javascript/Actions.html +++ b/docs/api/javascript/Actions.html @@ -1,6 +1,6 @@ Class: Actions
On this page

Actions

User facing API for generating complex user gestures. This class should not be instantiated directly. Instead, users should create new instances by calling WebDriver.actions().

Action Ticks

Action sequences are divided into a series of "ticks". At each tick, the WebDriver remote end will perform a single action for each device included in the action sequence. At tick 0, the driver will perform the first action defined for each device, at tick 1 the second action for each device, and so on until all actions have been executed. If an individual device does not have an action defined at a particular tick, it will automatically pause.

By default, action sequences will be synchronized so only one device has a define action in each tick. Consider the following code sample:

const actions = driver.actions();
+    
On this page

Actions

User facing API for generating complex user gestures. This class should not be instantiated directly. Instead, users should create new instances by calling WebDriver.actions().

Action Ticks

Action sequences are divided into a series of "ticks". At each tick, the WebDriver remote end will perform a single action for each device included in the action sequence. At tick 0, the driver will perform the first action defined for each device, at tick 1 the second action for each device, and so on until all actions have been executed. If an individual device does not have an action defined at a particular tick, it will automatically pause.

By default, action sequences will be synchronized so only one device has a define action in each tick. Consider the following code sample:

const actions = driver.actions();
 
 await actions
     .keyDown(SHIFT)
@@ -39,4 +39,4 @@
         actions.keyboard())  // Pause for release left
    .keyUp(Key.SHIFT);
 await actions.perform();
-
Parameters:
NameTypeAttributesDescription
durationnumber | Device<optional>

The length of the pause to insert, in milliseconds. Alternatively, the duration may be omitted (yielding a default 0 ms pause), and the first device to pause may be specified.

devicesDevice<repeatable>

The devices to insert the pause for. If no devices are specified, the pause will be inserted for all devices.

Returns:

a self reference.

Type: 
Actions

(async) perform() → (non-null) {Promise.<void>}

Performs the configured action sequence.

Returns:

a promise that will resolve when all actions have been completed.

Type: 
Promise.<void>

press(buttonopt, non-null) → (non-null) {Actions}

Inserts an action to press a mouse button at the mouse's current location.

Parameters:
NameTypeAttributesDescription
buttonButton<optional>

The button to press; defaults to LEFT.

Returns:

a self reference.

Type: 
Actions

release(buttonopt, non-null) → (non-null) {Actions}

Inserts an action to release a mouse button at the mouse's current location.

Parameters:
NameTypeAttributesDescription
buttonButton<optional>

The button to release; defaults to LEFT.

Returns:

a self reference.

Type: 
Actions

scroll(x, y, deltax, deltay, duration) → (non-null) {Actions}

scrolls a page via the coordinates given

Parameters:
NameTypeDescription
xnumber

starting x coordinate

ynumber

starting y coordinate

deltaxnumber

delta x to scroll to target

deltaynumber

delta y to scroll to target

durationnumber

duration ratio be the ratio of time delta and duration

Returns:

An action to scroll with this device.

Type: 
Actions

sendKeys(…keys) → (non-null) {Actions}

Inserts a sequence of actions to type the provided key sequence. For each key, this will record a pair of keyDown and keyUp actions. An implication of this pairing is that modifier keys (e.g. Key.SHIFT) will always be immediately released. In other words, sendKeys(Key.SHIFT, 'a') is the same as typing sendKeys('a'), not sendKeys('A').

Parameters:
NameTypeAttributesDescription
keysKey | string | number<repeatable>

the keys to type.

Returns:

a self reference.

Type: 
Actions

synchronize(…devicesnon-null) → (non-null) {Actions}

Ensures the action sequence for every device referenced in this action sequence is the same length. For devices whose sequence is too short, this will insert pauses so that every device has an explicit action defined at each tick.

Parameters:
NameTypeAttributesDescription
devicesDevice<repeatable>

The specific devices to synchronize. If unspecified, the action sequences for every device will be synchronized.

Returns:

a self reference.

Type: 
Actions

wheel() → (non-null) {Wheel}

Returns:

the wheel device handle.

Type: 
Wheel
Selenium WebDriver JavaScript API
\ No newline at end of file +
Parameters:
NameTypeAttributesDescription
durationnumber | Device<optional>

The length of the pause to insert, in milliseconds. Alternatively, the duration may be omitted (yielding a default 0 ms pause), and the first device to pause may be specified.

devicesDevice<repeatable>

The devices to insert the pause for. If no devices are specified, the pause will be inserted for all devices.

Returns:

a self reference.

Type: 
Actions

(async) perform() → (non-null) {Promise.<void>}

Performs the configured action sequence.

Returns:

a promise that will resolve when all actions have been completed.

Type: 
Promise.<void>

press(buttonopt, non-null) → (non-null) {Actions}

Inserts an action to press a mouse button at the mouse's current location.

Parameters:
NameTypeAttributesDescription
buttonButton<optional>

The button to press; defaults to LEFT.

Returns:

a self reference.

Type: 
Actions

release(buttonopt, non-null) → (non-null) {Actions}

Inserts an action to release a mouse button at the mouse's current location.

Parameters:
NameTypeAttributesDescription
buttonButton<optional>

The button to release; defaults to LEFT.

Returns:

a self reference.

Type: 
Actions

scroll(x, y, deltax, deltay, duration) → (non-null) {Actions}

scrolls a page via the coordinates given

Parameters:
NameTypeDescription
xnumber

starting x coordinate

ynumber

starting y coordinate

deltaxnumber

delta x to scroll to target

deltaynumber

delta y to scroll to target

durationnumber

duration ratio be the ratio of time delta and duration

Returns:

An action to scroll with this device.

Type: 
Actions

sendKeys(…keys) → (non-null) {Actions}

Inserts a sequence of actions to type the provided key sequence. For each key, this will record a pair of keyDown and keyUp actions. An implication of this pairing is that modifier keys (e.g. Key.SHIFT) will always be immediately released. In other words, sendKeys(Key.SHIFT, 'a') is the same as typing sendKeys('a'), not sendKeys('A').

Parameters:
NameTypeAttributesDescription
keysKey | string | number<repeatable>

the keys to type.

Returns:

a self reference.

Type: 
Actions

synchronize(…devicesnon-null) → (non-null) {Actions}

Ensures the action sequence for every device referenced in this action sequence is the same length. For devices whose sequence is too short, this will insert pauses so that every device has an explicit action defined at each tick.

Parameters:
NameTypeAttributesDescription
devicesDevice<repeatable>

The specific devices to synchronize. If unspecified, the action sequences for every device will be synchronized.

Returns:

a self reference.

Type: 
Actions

wheel() → (non-null) {Wheel}

Returns:

the wheel device handle.

Type: 
Wheel
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Alert.html b/docs/api/javascript/Alert.html index e134497552b69..99c7526d4e06f 100644 --- a/docs/api/javascript/Alert.html +++ b/docs/api/javascript/Alert.html @@ -1,3 +1,3 @@ Class: Alert
On this page

Alert

Represents a modal dialog such as {@code alert}, {@code confirm}, or {@code prompt}. Provides functions to retrieve the message displayed with the alert, accept or dismiss the alert, and set the response text (in the case of {@code prompt}).

Constructor

new Alert(drivernon-null, text)

Parameters:
NameTypeDescription
driverWebDriver

The driver controlling the browser this alert is attached to.

textstring

The message text displayed with this alert.

Methods

accept() → (non-null) {Promise.<void>}

Accepts this alert.

Returns:

A promise that will be resolved when this command has completed.

Type: 
Promise.<void>

dismiss() → (non-null) {Promise.<void>}

Dismisses this alert.

Returns:

A promise that will be resolved when this command has completed.

Type: 
Promise.<void>

getText() → (non-null) {Promise.<string>}

Retrieves the message text displayed with this alert. For instance, if the alert were opened with alert("hello"), then this would return "hello".

Returns:

A promise that will be resolved to the text displayed with this alert.

Type: 
Promise.<string>

sendKeys(text) → (non-null) {Promise.<void>}

Sets the response text on this alert. This command will return an error if the underlying alert does not support response text (e.g. window.alert and window.confirm).

Parameters:
NameTypeDescription
textstring

The text to set.

Returns:

A promise that will be resolved when this command has completed.

Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Alert

Represents a modal dialog such as {@code alert}, {@code confirm}, or {@code prompt}. Provides functions to retrieve the message displayed with the alert, accept or dismiss the alert, and set the response text (in the case of {@code prompt}).

Constructor

new Alert(drivernon-null, text)

Parameters:
NameTypeDescription
driverWebDriver

The driver controlling the browser this alert is attached to.

textstring

The message text displayed with this alert.

Methods

accept() → (non-null) {Promise.<void>}

Accepts this alert.

Returns:

A promise that will be resolved when this command has completed.

Type: 
Promise.<void>

dismiss() → (non-null) {Promise.<void>}

Dismisses this alert.

Returns:

A promise that will be resolved when this command has completed.

Type: 
Promise.<void>

getText() → (non-null) {Promise.<string>}

Retrieves the message text displayed with this alert. For instance, if the alert were opened with alert("hello"), then this would return "hello".

Returns:

A promise that will be resolved to the text displayed with this alert.

Type: 
Promise.<string>

sendKeys(text) → (non-null) {Promise.<void>}

Sets the response text on this alert. This command will return an error if the underlying alert does not support response text (e.g. window.alert and window.confirm).

Parameters:
NameTypeDescription
textstring

The text to set.

Returns:

A promise that will be resolved when this command has completed.

Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/AlertPromise.html b/docs/api/javascript/AlertPromise.html index 8cc116c75d93c..d2f44a17b17db 100644 --- a/docs/api/javascript/AlertPromise.html +++ b/docs/api/javascript/AlertPromise.html @@ -1,7 +1,7 @@ Class: AlertPromise
On this page

AlertPromise

AlertPromise is a promise that will be fulfilled with an Alert. This promise serves as a forward proxy on an Alert, allowing calls to be scheduled directly on this instance before the underlying Alert has been fulfilled. In other words, the following two statements are equivalent:

driver.switchTo().alert().dismiss();
+    
On this page

AlertPromise

AlertPromise is a promise that will be fulfilled with an Alert. This promise serves as a forward proxy on an Alert, allowing calls to be scheduled directly on this instance before the underlying Alert has been fulfilled. In other words, the following two statements are equivalent:

driver.switchTo().alert().dismiss();
 driver.switchTo().alert().then(function(alert) {
   return alert.dismiss();
 });
-

Constructor

new AlertPromise(drivernon-null, alertnon-null)

Parameters:
NameTypeDescription
driverWebDriver

The driver controlling the browser this alert is attached to.

alertPromise.<!Alert>

A thenable that will be fulfilled with the promised alert.

Implements

Members

catch

then

Methods

accept()

Defers action until the alert has been located.

dismiss()

Defers action until the alert has been located.

getText()

Defer returning text until the promised alert has been resolved.

sendKeys()

Defers action until the alert has been located.

Selenium WebDriver JavaScript API
\ No newline at end of file +

Constructor

new AlertPromise(drivernon-null, alertnon-null)

Parameters:
NameTypeDescription
driverWebDriver

The driver controlling the browser this alert is attached to.

alertPromise.<!Alert>

A thenable that will be fulfilled with the promised alert.

Implements

Members

catch

then

Methods

accept()

Defers action until the alert has been located.

dismiss()

Defers action until the alert has been located.

getText()

Defer returning text until the promised alert has been resolved.

sendKeys()

Defers action until the alert has been located.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ArgumentValue.html b/docs/api/javascript/ArgumentValue.html index b16be11022915..b3b235f78e514 100644 --- a/docs/api/javascript/ArgumentValue.html +++ b/docs/api/javascript/ArgumentValue.html @@ -1,3 +1,3 @@ Class: ArgumentValue
On this page

ArgumentValue

new ArgumentValue()

Deprecated
  • in favor of LocalValue methods for all argument values. This extra wrapper is not required.
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ArgumentValue

new ArgumentValue()

Deprecated
  • in favor of LocalValue methods for all argument values. This extra wrapper is not required.
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/BaseLogEntry.html b/docs/api/javascript/BaseLogEntry.html index dafe8fee5ebb2..8bd22d12c7e0a 100644 --- a/docs/api/javascript/BaseLogEntry.html +++ b/docs/api/javascript/BaseLogEntry.html @@ -1,3 +1,3 @@ Class: BaseLogEntry
On this page

BaseLogEntry

Represents a base log entry. Described in https://w3c.github.io/webdriver-bidi/#types-log-logentry.

Constructor

new BaseLogEntry(level, source, text, text, timeStamp, stackTrace)

Creates a new instance of BaseLogEntry.

Parameters:
NameTypeDescription
levelstring

The log level.

sourcesource

Script Source

textstring

The log source.

textstring

The log text.

timeStampnumber

The log timestamp.

stackTracestring

The log stack trace.

Members

level

Gets the log level.

stackTrace

Gets the log stack trace.

text

Gets the log text.

timeStamp

Gets the log timestamp.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

BaseLogEntry

Represents a base log entry. Described in https://w3c.github.io/webdriver-bidi/#types-log-logentry.

Constructor

new BaseLogEntry(level, source, text, text, timeStamp, stackTrace)

Creates a new instance of BaseLogEntry.

Parameters:
NameTypeDescription
levelstring

The log level.

sourcesource

Script Source

textstring

The log source.

textstring

The log text.

timeStampnumber

The log timestamp.

stackTracestring

The log stack trace.

Members

level

Gets the log level.

stackTrace

Gets the log stack trace.

text

Gets the log text.

timeStamp

Gets the log timestamp.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/BaseParameters.html b/docs/api/javascript/BaseParameters.html index 173526a8baaad..ea05b1ae2e13e 100644 --- a/docs/api/javascript/BaseParameters.html +++ b/docs/api/javascript/BaseParameters.html @@ -1,3 +1,3 @@ Class: BaseParameters
On this page

BaseParameters

Represents the base parameters for a network request. Described in https://w3c.github.io/webdriver-bidi/#type-network-BaseParameters.

Constructor

new BaseParameters()

Members

id

Gets the browsing context ID of the network request.

Gets the navigation information associated with the network request.

redirectCount

Gets the number of redirects that occurred during the network request.

request

Gets the request data for the network request.

timestamp

Gets the timestamp of the network request.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

BaseParameters

Represents the base parameters for a network request. Described in https://w3c.github.io/webdriver-bidi/#type-network-BaseParameters.

Constructor

new BaseParameters()

Members

id

Gets the browsing context ID of the network request.

Gets the navigation information associated with the network request.

redirectCount

Gets the number of redirects that occurred during the network request.

request

Gets the request data for the network request.

timestamp

Gets the timestamp of the network request.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/BeforeRequestSent.html b/docs/api/javascript/BeforeRequestSent.html index 8bc3e008200a2..c4f934aedff98 100644 --- a/docs/api/javascript/BeforeRequestSent.html +++ b/docs/api/javascript/BeforeRequestSent.html @@ -1,3 +1,3 @@ Class: BeforeRequestSent
On this page

BeforeRequestSent

Represents the BeforeRequestSent event parameters.

Constructor

new BeforeRequestSent()

Extends

Members

id

Gets the browsing context ID of the network request.

initiator

Get the initiator of the request.

Gets the navigation information associated with the network request.

redirectCount

Gets the number of redirects that occurred during the network request.

request

Gets the request data for the network request.

timestamp

Gets the timestamp of the network request.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

BeforeRequestSent

Represents the BeforeRequestSent event parameters.

Constructor

new BeforeRequestSent()

Extends

Members

id

Gets the browsing context ID of the network request.

initiator

Get the initiator of the request.

Gets the navigation information associated with the network request.

redirectCount

Gets the number of redirects that occurred during the network request.

request

Gets the request data for the network request.

timestamp

Gets the timestamp of the network request.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/BoxClipRectangle.html b/docs/api/javascript/BoxClipRectangle.html index 6cffa14a57f69..40811f4a541d6 100644 --- a/docs/api/javascript/BoxClipRectangle.html +++ b/docs/api/javascript/BoxClipRectangle.html @@ -1,3 +1,3 @@ Class: BoxClipRectangle
On this page

BoxClipRectangle

Represents a box-shaped clip rectangle.

Constructor

new BoxClipRectangle(x, y, width, height)

Constructs a new BoxClipRectangle object.

Parameters:
NameTypeDescription
xnumber

The x-coordinate of the top-left corner of the rectangle.

ynumber

The y-coordinate of the top-left corner of the rectangle.

widthnumber

The width of the rectangle.

heightnumber

The height of the rectangle.

Extends

Members

type

Gets the type of the clip rectangle.

Methods

asMap() → {Map.<string, any>}

Converts the BoxClipRectangle object to a Map.

Returns:
  • The Map representation of the BoxClipRectangle object.
Type: 
Map.<string, any>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

BoxClipRectangle

Represents a box-shaped clip rectangle.

Constructor

new BoxClipRectangle(x, y, width, height)

Constructs a new BoxClipRectangle object.

Parameters:
NameTypeDescription
xnumber

The x-coordinate of the top-left corner of the rectangle.

ynumber

The y-coordinate of the top-left corner of the rectangle.

widthnumber

The width of the rectangle.

heightnumber

The height of the rectangle.

Extends

Members

type

Gets the type of the clip rectangle.

Methods

asMap() → {Map.<string, any>}

Converts the BoxClipRectangle object to a Map.

Returns:
  • The Map representation of the BoxClipRectangle object.
Type: 
Map.<string, any>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/BrowsingContext.html b/docs/api/javascript/BrowsingContext.html index 729b29cafeaba..f674c2a67afd9 100644 --- a/docs/api/javascript/BrowsingContext.html +++ b/docs/api/javascript/BrowsingContext.html @@ -1,3 +1,3 @@ Class: BrowsingContext
On this page

BrowsingContext

Represents the contains under BrowsingContext module commands. Described in https://w3c.github.io/webdriver-bidi/#module-browsingContext Each browsing context command requires a browsing context id. Hence, this class represent browsing context lifecycle.

Constructor

new BrowsingContext()

Members

id

Methods

(async) activate() → {Promise.<void>}

Activates and focuses the top-level browsing context.

Throws:

If there is an error while activating the browsing context.

Type
Error
Returns:

A promise that resolves when the browsing context is activated.

Type: 
Promise.<void>

(async) back() → {Promise.<void>}

Navigates the browsing context to the previous page in the history.

Returns:

A promise that resolves when the navigation is complete.

Type: 
Promise.<void>

(async) captureElementScreenshot(sharedId, handleopt) → {Promise.<string>}

Captures a screenshot of a specific element within the browsing context.

Parameters:
NameTypeAttributesDescription
sharedIdstring

The shared ID of the element to capture.

handlestring<optional>

The handle of the element to capture (optional).

Returns:

A promise that resolves to the base64-encoded screenshot data.

Type: 
Promise.<string>

(async) captureScreenshot(captureScreenshotParametersopt) → {Promise.<string>}

Captures a screenshot of the browsing context.

Parameters:
NameTypeAttributesDescription
captureScreenshotParametersCaptureScreenshotParameters | undefined<optional>

Optional parameters for capturing the screenshot.

Throws:
  • If the provided captureScreenshotParameters is not an instance of CaptureScreenshotParameters.
Type
InvalidArgumentError
Returns:
  • A promise that resolves to the base64-encoded string representation of the captured screenshot.
Type: 
Promise.<string>

(async) close() → {Promise.<void>}

Closes the browsing context

Returns:
Type: 
Promise.<void>

(async) create()

Creates a browsing context for the given type with the given parameters

(async) forward() → {Promise.<void>}

Moves the browsing context forward by one step in the history.

Returns:

A promise that resolves when the browsing context has moved forward.

Type: 
Promise.<void>

(async) getTopLevelContexts() → {Promise.<Array.<BrowsingContextInfo>>}

Returns:

A Promise that resolves to an array of BrowsingContextInfo objects representing the top-level browsing contexts.

Type: 
Promise.<Array.<BrowsingContextInfo>>

(async) getTree(maxDepth)

Parameters:
NameTypeDescription
maxDepth

the max depth of the descendents of browsing context tree

Returns:

BrowsingContextInfo object

(async) handleUserPrompt(acceptopt, userTextopt)

Handles a user prompt in the browsing context.

Parameters:
NameTypeAttributesDescription
acceptboolean<optional>

Optional. Indicates whether to accept or dismiss the prompt.

userTextstring<optional>

Optional. The text to enter.

Throws:

If an error occurs while handling the user prompt.

Type
Error

(async) locateNode(locator, sandboxopt, serializationOptionsopt, startNodesopt) → {Promise.<RemoteValue>}

Locates a single node in the browsing context.

Parameters:
NameTypeAttributesDescription
locatorLocator

The locator used to find the node.

sandboxstring<optional>

The sandbox of the node (optional).

serializationOptionsSerializationOptions<optional>

The serialization options for the node (optional).

startNodesArray<optional>

The starting nodes for the search (optional).

Returns:
  • A promise that resolves to the located node.
Type: 
Promise.<RemoteValue>

(async) locateNodes(locator, maxNodeCountopt, sandboxopt, serializationOptionsopt, startNodesopt) → {Promise.<Array.<RemoteValue>>}

Locates nodes in the browsing context.

Parameters:
NameTypeAttributesDescription
locatorLocator

The locator object used to locate the nodes.

maxNodeCountnumber<optional>

The maximum number of nodes to locate (optional).

sandboxstring<optional>

The sandbox name for locating nodes (optional).

serializationOptionsSerializationOptions<optional>

The serialization options for locating nodes (optional).

startNodesArray.<ReferenceValue><optional>

The array of start nodes for locating nodes (optional).

Throws:
    • If the locator is not an instance of Locator.
    Type
    Error
    • If the serializationOptions is provided but not an instance of SerializationOptions.
    Type
    Error
    • If the startNodes is provided but not an array of ReferenceValue objects.
    Type
    Error
    • If any of the startNodes is not an instance of ReferenceValue.
    Type
    Error
Returns:
  • A promise that resolves to the arrays of located nodes.
Type: 
Promise.<Array.<RemoteValue>>
Parameters:
NameTypeDescription
url

the url to navigate to

readinessState

type of readiness state: "none" / "interactive" / "complete"

Returns:

NavigateResult object

(async) printPage(options)

Prints PDF of the webpage

Parameters:
NameTypeDescription
options

print options given by the user

Returns:

PrintResult object

(async) reload(ignoreCacheopt, readinessStateopt) → {Promise.<NavigateResult>}

Reloads the current browsing context.

Parameters:
NameTypeAttributesDescription
ignoreCacheboolean<optional>

Whether to ignore the cache when reloading.

readinessStatestring<optional>

The readiness state to wait for before returning. Valid readiness states are 'none', 'interactive', and 'complete'.

Throws:
  • If an invalid readiness state is provided.
Type
Error
Returns:
  • A promise that resolves to the result of the reload operation.
Type: 
Promise.<NavigateResult>

(async) setViewport(width, height, devicePixelRatioopt)

Sets the viewport size and device pixel ratio for the browsing context.

Parameters:
NameTypeAttributesDescription
widthnumber

The width of the viewport.

heightnumber

The height of the viewport.

devicePixelRationumber<optional>

The device pixel ratio (optional)

Throws:

If an error occurs while setting the viewport.

Type
Error

(async) traverseHistory(delta) → {Promise.<void>}

Traverses the browsing context history by a given delta.

Parameters:
NameTypeDescription
deltanumber

The delta value to traverse the history. A positive value moves forward, while a negative value moves backward.

Returns:
  • A promise that resolves when the history traversal is complete.
Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

BrowsingContext

Represents the contains under BrowsingContext module commands. Described in https://w3c.github.io/webdriver-bidi/#module-browsingContext Each browsing context command requires a browsing context id. Hence, this class represent browsing context lifecycle.

Constructor

new BrowsingContext()

Members

id

Methods

(async) activate() → {Promise.<void>}

Activates and focuses the top-level browsing context.

Throws:

If there is an error while activating the browsing context.

Type
Error
Returns:

A promise that resolves when the browsing context is activated.

Type: 
Promise.<void>

(async) back() → {Promise.<void>}

Navigates the browsing context to the previous page in the history.

Returns:

A promise that resolves when the navigation is complete.

Type: 
Promise.<void>

(async) captureElementScreenshot(sharedId, handleopt) → {Promise.<string>}

Captures a screenshot of a specific element within the browsing context.

Parameters:
NameTypeAttributesDescription
sharedIdstring

The shared ID of the element to capture.

handlestring<optional>

The handle of the element to capture (optional).

Returns:

A promise that resolves to the base64-encoded screenshot data.

Type: 
Promise.<string>

(async) captureScreenshot(captureScreenshotParametersopt) → {Promise.<string>}

Captures a screenshot of the browsing context.

Parameters:
NameTypeAttributesDescription
captureScreenshotParametersCaptureScreenshotParameters | undefined<optional>

Optional parameters for capturing the screenshot.

Throws:
  • If the provided captureScreenshotParameters is not an instance of CaptureScreenshotParameters.
Type
InvalidArgumentError
Returns:
  • A promise that resolves to the base64-encoded string representation of the captured screenshot.
Type: 
Promise.<string>

(async) close() → {Promise.<void>}

Closes the browsing context

Returns:
Type: 
Promise.<void>

(async) create()

Creates a browsing context for the given type with the given parameters

(async) forward() → {Promise.<void>}

Moves the browsing context forward by one step in the history.

Returns:

A promise that resolves when the browsing context has moved forward.

Type: 
Promise.<void>

(async) getTopLevelContexts() → {Promise.<Array.<BrowsingContextInfo>>}

Returns:

A Promise that resolves to an array of BrowsingContextInfo objects representing the top-level browsing contexts.

Type: 
Promise.<Array.<BrowsingContextInfo>>

(async) getTree(maxDepth)

Parameters:
NameTypeDescription
maxDepth

the max depth of the descendents of browsing context tree

Returns:

BrowsingContextInfo object

(async) handleUserPrompt(acceptopt, userTextopt)

Handles a user prompt in the browsing context.

Parameters:
NameTypeAttributesDescription
acceptboolean<optional>

Optional. Indicates whether to accept or dismiss the prompt.

userTextstring<optional>

Optional. The text to enter.

Throws:

If an error occurs while handling the user prompt.

Type
Error

(async) locateNode(locator, sandboxopt, serializationOptionsopt, startNodesopt) → {Promise.<RemoteValue>}

Locates a single node in the browsing context.

Parameters:
NameTypeAttributesDescription
locatorLocator

The locator used to find the node.

sandboxstring<optional>

The sandbox of the node (optional).

serializationOptionsSerializationOptions<optional>

The serialization options for the node (optional).

startNodesArray<optional>

The starting nodes for the search (optional).

Returns:
  • A promise that resolves to the located node.
Type: 
Promise.<RemoteValue>

(async) locateNodes(locator, maxNodeCountopt, sandboxopt, serializationOptionsopt, startNodesopt) → {Promise.<Array.<RemoteValue>>}

Locates nodes in the browsing context.

Parameters:
NameTypeAttributesDescription
locatorLocator

The locator object used to locate the nodes.

maxNodeCountnumber<optional>

The maximum number of nodes to locate (optional).

sandboxstring<optional>

The sandbox name for locating nodes (optional).

serializationOptionsSerializationOptions<optional>

The serialization options for locating nodes (optional).

startNodesArray.<ReferenceValue><optional>

The array of start nodes for locating nodes (optional).

Throws:
    • If the locator is not an instance of Locator.
    Type
    Error
    • If the serializationOptions is provided but not an instance of SerializationOptions.
    Type
    Error
    • If the startNodes is provided but not an array of ReferenceValue objects.
    Type
    Error
    • If any of the startNodes is not an instance of ReferenceValue.
    Type
    Error
Returns:
  • A promise that resolves to the arrays of located nodes.
Type: 
Promise.<Array.<RemoteValue>>
Parameters:
NameTypeDescription
url

the url to navigate to

readinessState

type of readiness state: "none" / "interactive" / "complete"

Returns:

NavigateResult object

(async) printPage(options)

Prints PDF of the webpage

Parameters:
NameTypeDescription
options

print options given by the user

Returns:

PrintResult object

(async) reload(ignoreCacheopt, readinessStateopt) → {Promise.<NavigateResult>}

Reloads the current browsing context.

Parameters:
NameTypeAttributesDescription
ignoreCacheboolean<optional>

Whether to ignore the cache when reloading.

readinessStatestring<optional>

The readiness state to wait for before returning. Valid readiness states are 'none', 'interactive', and 'complete'.

Throws:
  • If an invalid readiness state is provided.
Type
Error
Returns:
  • A promise that resolves to the result of the reload operation.
Type: 
Promise.<NavigateResult>

(async) setViewport(width, height, devicePixelRatioopt)

Sets the viewport size and device pixel ratio for the browsing context.

Parameters:
NameTypeAttributesDescription
widthnumber

The width of the viewport.

heightnumber

The height of the viewport.

devicePixelRationumber<optional>

The device pixel ratio (optional)

Throws:

If an error occurs while setting the viewport.

Type
Error

(async) traverseHistory(delta) → {Promise.<void>}

Traverses the browsing context history by a given delta.

Parameters:
NameTypeDescription
deltanumber

The delta value to traverse the history. A positive value moves forward, while a negative value moves backward.

Returns:
  • A promise that resolves when the history traversal is complete.
Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/BrowsingContextInfo.html b/docs/api/javascript/BrowsingContextInfo.html index 03ed958ece5b1..e9f3edc676d27 100644 --- a/docs/api/javascript/BrowsingContextInfo.html +++ b/docs/api/javascript/BrowsingContextInfo.html @@ -1,3 +1,3 @@ Class: BrowsingContextInfo
On this page

BrowsingContextInfo

Represents information about a browsing context. Described in https://w3c.github.io/webdriver-bidi/#type-browsingContext-Info

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

BrowsingContextInfo

Represents information about a browsing context. Described in https://w3c.github.io/webdriver-bidi/#type-browsingContext-Info

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/BrowsingContextInspector.html b/docs/api/javascript/BrowsingContextInspector.html index 6d4569641edf8..919aef8970a8a 100644 --- a/docs/api/javascript/BrowsingContextInspector.html +++ b/docs/api/javascript/BrowsingContextInspector.html @@ -1,3 +1,3 @@ Class: BrowsingContextInspector
On this page

BrowsingContextInspector

Represents a browsing context related events. Described in https://w3c.github.io/webdriver-bidi/#module-contexts-events. While BrowsingContext class represents a browsing context lifecycle and related commands. This class is specific to listening to events. Events can be subscribed to multiple browsing contexts or all of them.

Constructor

new BrowsingContextInspector()

Methods

(async) onBrowsingContextCreated(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.contextCreated' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onBrowsingContextDestroyed(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.contextDestroyed' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onBrowsingContextLoaded(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.load' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onDomContentLoaded(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.domContentLoaded' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onFragmentNavigated(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.fragmentNavigated' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onNavigationStarted(callback) → {Promise.<void>}

Subscribe to the 'browsingContext.navigationStarted' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onUserPromptClosed(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.userPromptClosed' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onUserPromptOpened(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.userPromptOpened' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

BrowsingContextInspector

Represents a browsing context related events. Described in https://w3c.github.io/webdriver-bidi/#module-contexts-events. While BrowsingContext class represents a browsing context lifecycle and related commands. This class is specific to listening to events. Events can be subscribed to multiple browsing contexts or all of them.

Constructor

new BrowsingContextInspector()

Methods

(async) onBrowsingContextCreated(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.contextCreated' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onBrowsingContextDestroyed(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.contextDestroyed' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onBrowsingContextLoaded(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.load' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onDomContentLoaded(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.domContentLoaded' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onFragmentNavigated(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.fragmentNavigated' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onNavigationStarted(callback) → {Promise.<void>}

Subscribe to the 'browsingContext.navigationStarted' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onUserPromptClosed(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.userPromptClosed' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>

(async) onUserPromptOpened(callback) → {Promise.<void>}

Subscribes to the 'browsingContext.userPromptOpened' event.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the event is emitted.
Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/BrowsingContextPartitionDescriptor.html b/docs/api/javascript/BrowsingContextPartitionDescriptor.html index 2ca6e9fe75617..b98d935d33bd3 100644 --- a/docs/api/javascript/BrowsingContextPartitionDescriptor.html +++ b/docs/api/javascript/BrowsingContextPartitionDescriptor.html @@ -1,3 +1,3 @@ Class: BrowsingContextPartitionDescriptor
On this page

BrowsingContextPartitionDescriptor

Represents a partition descriptor for a browsing context.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

BrowsingContextPartitionDescriptor

Represents a partition descriptor for a browsing context.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Build.html b/docs/api/javascript/Build.html index 3714e39181e87..efc2b710155cb 100644 --- a/docs/api/javascript/Build.html +++ b/docs/api/javascript/Build.html @@ -1,3 +1,3 @@ Class: Build
On this page

Build

new Build(targetsnon-null)

Parameters:
NameTypeDescription
targetsArray.<string>

The targets to build.

Throws:

If not running in dev mode.

Type
Error

Methods

go() → (non-null) {Promise}

Executes the build.

Throws:

If no targets were specified.

Type
Error
Returns:

A promise that will be resolved when the build has completed.

Type: 
Promise

onlyOnce() → (non-null) {Build}

Configures this build to only execute if it has not previously been run during the life of the current process.

Returns:

A self reference.

Type: 
Build
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Build

new Build(targetsnon-null)

Parameters:
NameTypeDescription
targetsArray.<string>

The targets to build.

Throws:

If not running in dev mode.

Type
Error

Methods

go() → (non-null) {Promise}

Executes the build.

Throws:

If no targets were specified.

Type
Error
Returns:

A promise that will be resolved when the build has completed.

Type: 
Promise

onlyOnce() → (non-null) {Build}

Configures this build to only execute if it has not previously been run during the life of the current process.

Returns:

A self reference.

Type: 
Build
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Builder.html b/docs/api/javascript/Builder.html index 39e823722adba..81e8e69823184 100644 --- a/docs/api/javascript/Builder.html +++ b/docs/api/javascript/Builder.html @@ -1,6 +1,6 @@ Class: Builder
On this page

Builder

Creates new WebDriver instances. The environment variables listed below may be used to override a builder's configuration, allowing quick runtime changes.

  • {@code SELENIUM_BROWSER}: defines the target browser in the form {@code browser[:version][:platform]}.

  • {@code SELENIUM_REMOTE_URL}: defines the remote URL for all builder instances. This environment variable should be set to a fully qualified URL for a WebDriver server (e.g. http://localhost:4444/wd/hub). This option always takes precedence over {@code SELENIUM_SERVER_JAR}.

  • {@code SELENIUM_SERVER_JAR}: defines the path to the standalone Selenium server jar to use. The server will be started the first time a WebDriver instance and be killed when the process exits.

Suppose you had mytest.js that created WebDriver with

var driver = new webdriver.Builder()
+    
On this page

Builder

Creates new WebDriver instances. The environment variables listed below may be used to override a builder's configuration, allowing quick runtime changes.

  • {@code SELENIUM_BROWSER}: defines the target browser in the form {@code browser[:version][:platform]}.

  • {@code SELENIUM_REMOTE_URL}: defines the remote URL for all builder instances. This environment variable should be set to a fully qualified URL for a WebDriver server (e.g. http://localhost:4444/wd/hub). This option always takes precedence over {@code SELENIUM_SERVER_JAR}.

  • {@code SELENIUM_SERVER_JAR}: defines the path to the standalone Selenium server jar to use. The server will be started the first time a WebDriver instance and be killed when the process exits.

Suppose you had mytest.js that created WebDriver with

var driver = new webdriver.Builder()
     .forBrowser('chrome')
     .build();
 

This test could be made to use Firefox on the local machine by running with SELENIUM_BROWSER=firefox node mytest.js. Rather than change the code to target Google Chrome on a remote machine, you can simply set the SELENIUM_BROWSER and SELENIUM_REMOTE_URL environment variables:

SELENIUM_BROWSER=chrome:36:LINUX \
@@ -9,4 +9,4 @@
 

You could also use a local copy of the standalone Selenium server:

SELENIUM_BROWSER=chrome:36:LINUX \
 SELENIUM_SERVER_JAR=/path/to/selenium-server-standalone.jar \
 node mytest.js
-

Constructor

new Builder()

Methods

build() → (non-null) {ThenableWebDriver}

Creates a new WebDriver client based on this builder's current configuration.

This method will return a ThenableWebDriver instance, allowing users to issue commands directly without calling then(). The returned thenable wraps a promise that will resolve to a concrete WebDriver instance. The promise will be rejected if the remote end fails to create a new session.

Throws:

If the current configuration is invalid.

Type
Error
Returns:

A new WebDriver instance.

Type: 
ThenableWebDriver

disableEnvironmentOverrides() → (non-null) {Builder}

Configures this builder to ignore any environment variable overrides and to only use the configuration specified through this instance's API.

Returns:

A self reference.

Type: 
Builder

forBrowser(name, opt_versionopt, opt_platformopt) → (non-null) {Builder}

Configures the target browser for clients created by this instance. Any calls to #withCapabilities after this function will overwrite these settings.

You may also define the target browser using the {@code SELENIUM_BROWSER} environment variable. If set, this environment variable should be of the form browser[:[version][:platform]].

Parameters:
NameTypeAttributesDescription
namestring | Browser

The name of the target browser; common defaults are available on the webdriver.Browser enum.

opt_versionstring<optional>

A desired version; may be omitted if any version should be used.

opt_platformstring | capabilities.Platform<optional>

The desired platform; may be omitted if any platform may be used.

Returns:

A self reference.

Type: 
Builder

getCapabilities() → (non-null) {Capabilities}

Returns the base set of capabilities this instance is currently configured to use.

Returns:

The current capabilities for this builder.

Type: 
Capabilities

getChromeOptions() → {chrome.Options}

Returns:

the Chrome specific options currently configured for this builder.

Type: 
chrome.Options

getFirefoxOptions() → {firefox.Options}

Returns:

the Firefox specific options currently configured for this instance.

Type: 
firefox.Options

getHttpAgent() → {http.Agent}

Returns:

The http agent used for each request

Type: 
http.Agent

getSafariOptions() → {safari.Options}

Returns:

the Safari specific options currently configured for this instance.

Type: 
safari.Options

getServerUrl() → {string}

Returns:

The URL of the WebDriver server this instance is configured to use.

Type: 
string

getWebDriverProxy() → (nullable) {string}

Returns:

The URL of the proxy server to use for the WebDriver's HTTP connections, or null if not set.

Type: 
string

setAlertBehavior(behaviornullable) → (non-null) {Builder}

Sets the default action to take with an unexpected alert before returning an error.

Parameters:
NameTypeAttributesDescription
behaviorcapabilities.UserPromptHandler<nullable>

The desired behavior.

See
  • capabilities.Capabilities#setAlertBehavior
Returns:

A self reference.

Type: 
Builder

setCapability(key, value) → (non-null) {Builder}

Sets the desired capability when requesting a new session. If there is already a capability named key, its value will be overwritten with value. This is a convenience wrapper around builder.getCapabilities().set(key, value) to support Builder method chaining.

Parameters:
NameTypeDescription
keystring

The capability key.

value*

The capability value.

Returns:

A self reference.

Type: 
Builder

setChromeOptions(optionsnon-null) → (non-null) {Builder}

Sets Chrome specific options for drivers created by this builder. Any logging or proxy settings defined on the given options will take precedence over those set through #setLoggingPrefs and #setProxy, respectively.

Parameters:
NameTypeDescription
optionschrome.Options

The ChromeDriver options to use.

Returns:

A self reference.

Type: 
Builder

setChromeService(service) → (non-null) {Builder}

Sets the service builder to use for managing the chromedriver child process when creating new Chrome sessions.

Parameters:
NameTypeDescription
servicechrome.ServiceBuilder

the service to use.

Returns:

A self reference.

Type: 
Builder

setEdgeOptions(optionsnon-null) → (non-null) {Builder}

Set options specific to Microsoft's Edge browser for drivers created by this builder. Any proxy settings defined on the given options will take precedence over those set through #setProxy.

Parameters:
NameTypeDescription
optionsedge.Options

The MicrosoftEdgeDriver options to use.

Returns:

A self reference.

Type: 
Builder

setEdgeService(service) → (non-null) {Builder}

Sets the edge.ServiceBuilder to use to manage the MicrosoftEdgeDriver child process when creating sessions locally.

Parameters:
NameTypeDescription
serviceedge.ServiceBuilder

the service to use.

Returns:

a self reference.

Type: 
Builder

setFirefoxOptions(optionsnon-null) → (non-null) {Builder}

Sets Firefox specific options for drivers created by this builder. Any logging or proxy settings defined on the given options will take precedence over those set through #setLoggingPrefs and #setProxy, respectively.

Parameters:
NameTypeDescription
optionsfirefox.Options

The FirefoxDriver options to use.

Returns:

A self reference.

Type: 
Builder

setFirefoxService(service) → (non-null) {Builder}

Sets the firefox.ServiceBuilder to use to manage the geckodriver child process when creating Firefox sessions locally.

Parameters:
NameTypeDescription
servicefirefox.ServiceBuilder

the service to use.

Returns:

a self reference.

Type: 
Builder

setIeOptions(optionsnon-null) → (non-null) {Builder}

Set Internet Explorer specific options for drivers created by this builder. Any proxy settings defined on the given options will take precedence over those set through #setProxy.

Parameters:
NameTypeDescription
optionsie.Options

The IEDriver options to use.

Returns:

A self reference.

Type: 
Builder

setIeService(service) → (non-null) {Builder}

Sets the ie.ServiceBuilder to use to manage the geckodriver child process when creating IE sessions locally.

Parameters:
NameTypeDescription
serviceie.ServiceBuilder

the service to use.

Returns:

a self reference.

Type: 
Builder

setLoggingPrefs(prefs) → (non-null) {Builder}

Sets the logging preferences for the created session. Preferences may be changed by repeated calls, or by calling #withCapabilities.

Parameters:
NameTypeDescription
prefs
Returns:

A self reference.

Type: 
Builder

setProxy(config) → (non-null) {Builder}

Sets the proxy configuration for the target browser. Any calls to #withCapabilities after this function will overwrite these settings.

Parameters:
NameTypeDescription
config
Returns:

A self reference.

Type: 
Builder

setSafariOptions(optionsnon-null) → (non-null) {Builder}

Sets Safari specific options for drivers created by this builder. Any logging settings defined on the given options will take precedence over those set through #setLoggingPrefs.

Parameters:
NameTypeDescription
optionssafari.Options

The Safari options to use.

Returns:

A self reference.

Type: 
Builder

usingHttpAgent(agent) → (non-null) {Builder}

Sets the http agent to use for each request. If this method is not called, the Builder will use http.globalAgent by default.

Parameters:
NameTypeDescription
agenthttp.Agent

The agent to use for each request.

Returns:

A self reference.

Type: 
Builder

usingServer(url) → (non-null) {Builder}

Sets the URL of a remote WebDriver server to use. Once a remote URL has been specified, the builder direct all new clients to that server. If this method is never called, the Builder will attempt to create all clients locally.

As an alternative to this method, you may also set the SELENIUM_REMOTE_URL environment variable.

Parameters:
NameTypeDescription
urlstring

The URL of a remote server to use.

Returns:

A self reference.

Type: 
Builder

usingWebDriverProxy(proxy) → (non-null) {Builder}

Sets the URL of the proxy to use for the WebDriver's HTTP connections. If this method is never called, the Builder will create a connection without a proxy.

Parameters:
NameTypeDescription
proxystring

The URL of a proxy to use.

Returns:

A self reference.

Type: 
Builder

withCapabilities(capabilitiesnon-null) → (non-null) {Builder}

Recommended way is to use set*Options where * is the browser(eg setChromeOptions)

Sets the desired capabilities when requesting a new session. This will overwrite any previously set capabilities.

Parameters:
NameTypeDescription
capabilitiesObject | Capabilities

The desired capabilities for a new session.

Returns:

A self reference.

Type: 
Builder
Selenium WebDriver JavaScript API
\ No newline at end of file +

Constructor

new Builder()

Methods

build() → (non-null) {ThenableWebDriver}

Creates a new WebDriver client based on this builder's current configuration.

This method will return a ThenableWebDriver instance, allowing users to issue commands directly without calling then(). The returned thenable wraps a promise that will resolve to a concrete WebDriver instance. The promise will be rejected if the remote end fails to create a new session.

Throws:

If the current configuration is invalid.

Type
Error
Returns:

A new WebDriver instance.

Type: 
ThenableWebDriver

disableEnvironmentOverrides() → (non-null) {Builder}

Configures this builder to ignore any environment variable overrides and to only use the configuration specified through this instance's API.

Returns:

A self reference.

Type: 
Builder

forBrowser(name, opt_versionopt, opt_platformopt) → (non-null) {Builder}

Configures the target browser for clients created by this instance. Any calls to #withCapabilities after this function will overwrite these settings.

You may also define the target browser using the {@code SELENIUM_BROWSER} environment variable. If set, this environment variable should be of the form browser[:[version][:platform]].

Parameters:
NameTypeAttributesDescription
namestring | Browser

The name of the target browser; common defaults are available on the webdriver.Browser enum.

opt_versionstring<optional>

A desired version; may be omitted if any version should be used.

opt_platformstring | capabilities.Platform<optional>

The desired platform; may be omitted if any platform may be used.

Returns:

A self reference.

Type: 
Builder

getCapabilities() → (non-null) {Capabilities}

Returns the base set of capabilities this instance is currently configured to use.

Returns:

The current capabilities for this builder.

Type: 
Capabilities

getChromeOptions() → {chrome.Options}

Returns:

the Chrome specific options currently configured for this builder.

Type: 
chrome.Options

getFirefoxOptions() → {firefox.Options}

Returns:

the Firefox specific options currently configured for this instance.

Type: 
firefox.Options

getHttpAgent() → {http.Agent}

Returns:

The http agent used for each request

Type: 
http.Agent

getSafariOptions() → {safari.Options}

Returns:

the Safari specific options currently configured for this instance.

Type: 
safari.Options

getServerUrl() → {string}

Returns:

The URL of the WebDriver server this instance is configured to use.

Type: 
string

getWebDriverProxy() → (nullable) {string}

Returns:

The URL of the proxy server to use for the WebDriver's HTTP connections, or null if not set.

Type: 
string

setAlertBehavior(behaviornullable) → (non-null) {Builder}

Sets the default action to take with an unexpected alert before returning an error.

Parameters:
NameTypeAttributesDescription
behaviorcapabilities.UserPromptHandler<nullable>

The desired behavior.

See
  • capabilities.Capabilities#setAlertBehavior
Returns:

A self reference.

Type: 
Builder

setCapability(key, value) → (non-null) {Builder}

Sets the desired capability when requesting a new session. If there is already a capability named key, its value will be overwritten with value. This is a convenience wrapper around builder.getCapabilities().set(key, value) to support Builder method chaining.

Parameters:
NameTypeDescription
keystring

The capability key.

value*

The capability value.

Returns:

A self reference.

Type: 
Builder

setChromeOptions(optionsnon-null) → (non-null) {Builder}

Sets Chrome specific options for drivers created by this builder. Any logging or proxy settings defined on the given options will take precedence over those set through #setLoggingPrefs and #setProxy, respectively.

Parameters:
NameTypeDescription
optionschrome.Options

The ChromeDriver options to use.

Returns:

A self reference.

Type: 
Builder

setChromeService(service) → (non-null) {Builder}

Sets the service builder to use for managing the chromedriver child process when creating new Chrome sessions.

Parameters:
NameTypeDescription
servicechrome.ServiceBuilder

the service to use.

Returns:

A self reference.

Type: 
Builder

setEdgeOptions(optionsnon-null) → (non-null) {Builder}

Set options specific to Microsoft's Edge browser for drivers created by this builder. Any proxy settings defined on the given options will take precedence over those set through #setProxy.

Parameters:
NameTypeDescription
optionsedge.Options

The MicrosoftEdgeDriver options to use.

Returns:

A self reference.

Type: 
Builder

setEdgeService(service) → (non-null) {Builder}

Sets the edge.ServiceBuilder to use to manage the MicrosoftEdgeDriver child process when creating sessions locally.

Parameters:
NameTypeDescription
serviceedge.ServiceBuilder

the service to use.

Returns:

a self reference.

Type: 
Builder

setFirefoxOptions(optionsnon-null) → (non-null) {Builder}

Sets Firefox specific options for drivers created by this builder. Any logging or proxy settings defined on the given options will take precedence over those set through #setLoggingPrefs and #setProxy, respectively.

Parameters:
NameTypeDescription
optionsfirefox.Options

The FirefoxDriver options to use.

Returns:

A self reference.

Type: 
Builder

setFirefoxService(service) → (non-null) {Builder}

Sets the firefox.ServiceBuilder to use to manage the geckodriver child process when creating Firefox sessions locally.

Parameters:
NameTypeDescription
servicefirefox.ServiceBuilder

the service to use.

Returns:

a self reference.

Type: 
Builder

setIeOptions(optionsnon-null) → (non-null) {Builder}

Set Internet Explorer specific options for drivers created by this builder. Any proxy settings defined on the given options will take precedence over those set through #setProxy.

Parameters:
NameTypeDescription
optionsie.Options

The IEDriver options to use.

Returns:

A self reference.

Type: 
Builder

setIeService(service) → (non-null) {Builder}

Sets the ie.ServiceBuilder to use to manage the geckodriver child process when creating IE sessions locally.

Parameters:
NameTypeDescription
serviceie.ServiceBuilder

the service to use.

Returns:

a self reference.

Type: 
Builder

setLoggingPrefs(prefs) → (non-null) {Builder}

Sets the logging preferences for the created session. Preferences may be changed by repeated calls, or by calling #withCapabilities.

Parameters:
NameTypeDescription
prefs
Returns:

A self reference.

Type: 
Builder

setProxy(config) → (non-null) {Builder}

Sets the proxy configuration for the target browser. Any calls to #withCapabilities after this function will overwrite these settings.

Parameters:
NameTypeDescription
config
Returns:

A self reference.

Type: 
Builder

setSafariOptions(optionsnon-null) → (non-null) {Builder}

Sets Safari specific options for drivers created by this builder. Any logging settings defined on the given options will take precedence over those set through #setLoggingPrefs.

Parameters:
NameTypeDescription
optionssafari.Options

The Safari options to use.

Returns:

A self reference.

Type: 
Builder

usingHttpAgent(agent) → (non-null) {Builder}

Sets the http agent to use for each request. If this method is not called, the Builder will use http.globalAgent by default.

Parameters:
NameTypeDescription
agenthttp.Agent

The agent to use for each request.

Returns:

A self reference.

Type: 
Builder

usingServer(url) → (non-null) {Builder}

Sets the URL of a remote WebDriver server to use. Once a remote URL has been specified, the builder direct all new clients to that server. If this method is never called, the Builder will attempt to create all clients locally.

As an alternative to this method, you may also set the SELENIUM_REMOTE_URL environment variable.

Parameters:
NameTypeDescription
urlstring

The URL of a remote server to use.

Returns:

A self reference.

Type: 
Builder

usingWebDriverProxy(proxy) → (non-null) {Builder}

Sets the URL of the proxy to use for the WebDriver's HTTP connections. If this method is never called, the Builder will create a connection without a proxy.

Parameters:
NameTypeDescription
proxystring

The URL of a proxy to use.

Returns:

A self reference.

Type: 
Builder

withCapabilities(capabilitiesnon-null) → (non-null) {Builder}

Recommended way is to use set*Options where * is the browser(eg setChromeOptions)

Sets the desired capabilities when requesting a new session. This will overwrite any previously set capabilities.

Parameters:
NameTypeDescription
capabilitiesObject | Capabilities

The desired capabilities for a new session.

Returns:

A self reference.

Type: 
Builder
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/By.html b/docs/api/javascript/By.html index 11e7b89c6a31e..ba2c5b179a6be 100644 --- a/docs/api/javascript/By.html +++ b/docs/api/javascript/By.html @@ -1,3 +1,3 @@ Class: By
On this page

By

Describes a mechanism for locating an element on the page.

Constructor

new By(using, value)

Parameters:
NameTypeDescription
usingstring

the name of the location strategy to use.

valuestring

the value to search for.

Members

using :string

Type:
  • string

value :string

Type:
  • string

Methods

toString()

(static) className(name) → (non-null) {By}

Locates elements that have a specific class name.

Parameters:
NameTypeDescription
namestring

The class name to search for.

Returns:

The new locator.

Type: 
By

(static) css(selector) → (non-null) {By}

Locates elements using a CSS selector.

Parameters:
NameTypeDescription
selectorstring

The CSS selector to use.

Returns:

The new locator.

Type: 
By

(static) id(id) → (non-null) {By}

Locates elements by the ID attribute. This locator uses the CSS selector *[id="$ID"], not document.getElementById.

Parameters:
NameTypeDescription
idstring

The ID to search for.

Returns:

The new locator.

Type: 
By

(static) js(scriptnon-null, …var_args)

Locates elements by evaluating a script that defines the body of a JavaScript function. The return value of this function must be an element or an array-like list of elements. When this locator returns a list of elements, but only one is expected, the first element in this list will be used as the single element value.

Parameters:
NameTypeAttributesDescription
scriptstring | function

The script to execute.

var_args*<repeatable>

The arguments to pass to the script.

Returns:

(static) linkText(text) → (non-null) {By}

Locates link elements whose visible text matches the given string.

Parameters:
NameTypeDescription
textstring

The link text to search for.

Returns:

The new locator.

Type: 
By

(static) name(name) → (non-null) {By}

Locates elements whose name attribute has the given value.

Parameters:
NameTypeDescription
namestring

The name attribute to search for.

Returns:

The new locator.

Type: 
By

(static) partialLinkText(text) → (non-null) {By}

Locates link elements whose visible text contains the given substring.

Parameters:
NameTypeDescription
textstring

The substring to check for in a link's visible text.

Returns:

The new locator.

Type: 
By

(static) tagName(name) → (non-null) {By}

Locates elements with a given tag name.

Parameters:
NameTypeDescription
namestring

The tag name to search for.

Returns:

The new locator.

Type: 
By

(static) xpath(xpath) → (non-null) {By}

Locates elements matching a XPath selector. Care should be taken when using an XPath selector with a webdriver.WebElement as WebDriver will respect the context in the specified in the selector. For example, given the selector //div, WebDriver will search from the document root regardless of whether the locator was used with a WebElement.

Parameters:
NameTypeDescription
xpathstring

The XPath selector to use.

Returns:

The new locator.

Type: 
By
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

By

Describes a mechanism for locating an element on the page.

Constructor

new By(using, value)

Parameters:
NameTypeDescription
usingstring

the name of the location strategy to use.

valuestring

the value to search for.

Members

using :string

Type:
  • string

value :string

Type:
  • string

Methods

toString()

(static) className(name) → (non-null) {By}

Locates elements that have a specific class name.

Parameters:
NameTypeDescription
namestring

The class name to search for.

Returns:

The new locator.

Type: 
By

(static) css(selector) → (non-null) {By}

Locates elements using a CSS selector.

Parameters:
NameTypeDescription
selectorstring

The CSS selector to use.

Returns:

The new locator.

Type: 
By

(static) id(id) → (non-null) {By}

Locates elements by the ID attribute. This locator uses the CSS selector *[id="$ID"], not document.getElementById.

Parameters:
NameTypeDescription
idstring

The ID to search for.

Returns:

The new locator.

Type: 
By

(static) js(scriptnon-null, …var_args)

Locates elements by evaluating a script that defines the body of a JavaScript function. The return value of this function must be an element or an array-like list of elements. When this locator returns a list of elements, but only one is expected, the first element in this list will be used as the single element value.

Parameters:
NameTypeAttributesDescription
scriptstring | function

The script to execute.

var_args*<repeatable>

The arguments to pass to the script.

Returns:

(static) linkText(text) → (non-null) {By}

Locates link elements whose visible text matches the given string.

Parameters:
NameTypeDescription
textstring

The link text to search for.

Returns:

The new locator.

Type: 
By

(static) name(name) → (non-null) {By}

Locates elements whose name attribute has the given value.

Parameters:
NameTypeDescription
namestring

The name attribute to search for.

Returns:

The new locator.

Type: 
By

(static) partialLinkText(text) → (non-null) {By}

Locates link elements whose visible text contains the given substring.

Parameters:
NameTypeDescription
textstring

The substring to check for in a link's visible text.

Returns:

The new locator.

Type: 
By

(static) tagName(name) → (non-null) {By}

Locates elements with a given tag name.

Parameters:
NameTypeDescription
namestring

The tag name to search for.

Returns:

The new locator.

Type: 
By

(static) xpath(xpath) → (non-null) {By}

Locates elements matching a XPath selector. Care should be taken when using an XPath selector with a webdriver.WebElement as WebDriver will respect the context in the specified in the selector. For example, given the selector //div, WebDriver will search from the document root regardless of whether the locator was used with a WebElement.

Parameters:
NameTypeDescription
xpathstring

The XPath selector to use.

Returns:

The new locator.

Type: 
By
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/BytesValue.html b/docs/api/javascript/BytesValue.html index cf2956b12095e..5692a48efa310 100644 --- a/docs/api/javascript/BytesValue.html +++ b/docs/api/javascript/BytesValue.html @@ -1,3 +1,3 @@ Class: BytesValue
On this page

BytesValue

Represents a BytesValue object. Described in https://w3c.github.io/webdriver-bidi/#type-network-BytesValue.

Constructor

new BytesValue(type, value)

Creates a new BytesValue instance.

Parameters:
NameTypeDescription
typestring

The type of the BytesValue.

valuestring

The value of the BytesValue.

Members

type

Gets the type of the BytesValue.

value

Gets the value of the BytesValue.

Methods

asMap() → {Map.<string, string>}

Converts the BytesValue to a map.

Returns:

A map representation of the BytesValue.

Type: 
Map.<string, string>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

BytesValue

Represents a BytesValue object. Described in https://w3c.github.io/webdriver-bidi/#type-network-BytesValue.

Constructor

new BytesValue(type, value)

Creates a new BytesValue instance.

Parameters:
NameTypeDescription
typestring

The type of the BytesValue.

valuestring

The value of the BytesValue.

Members

type

Gets the type of the BytesValue.

value

Gets the value of the BytesValue.

Methods

asMap() → {Map.<string, string>}

Converts the BytesValue to a map.

Returns:

A map representation of the BytesValue.

Type: 
Map.<string, string>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Capabilities.html b/docs/api/javascript/Capabilities.html index 4b18546aab9a1..c965192c2fbe6 100644 --- a/docs/api/javascript/Capabilities.html +++ b/docs/api/javascript/Capabilities.html @@ -1,3 +1,3 @@ Class: Capabilities
On this page

Capabilities

Describes a set of capabilities for a WebDriver session.

Constructor

new Capabilities(otheropt)

Parameters:
NameTypeAttributesDescription
otherCapabilities | Map.<string, ?> | Object<optional>

Another set of capabilities to initialize this instance from.

Members

size

Methods

delete(key)

Deletes an entry from this set of capabilities.

Parameters:
NameTypeDescription
keystring

the capability key to delete.

get(key) → {T}

Parameters:
NameTypeDescription
keystring

the parameter key to get.

Returns:

the stored parameter value.

Type: 
T

getAcceptInsecureCerts() → {boolean}

Returns:

whether the session is configured to accept insecure TLS certificates.

Type: 
boolean

getAlertBehavior() → {UserPromptHandler|undefined}

Returns:

the behavior pattern for responding to unhandled user prompts, or undefined if not set.

Type: 
UserPromptHandler | undefined

getBrowserName() → {string|undefined}

Returns:

the configured browser name, or undefined if not set.

Type: 
string | undefined

getBrowserVersion() → {string|undefined}

Returns:

the configured browser version, or undefined if not set.

Type: 
string | undefined

getPageLoadStrategy() → {string|undefined}

Returns the configured page load strategy.

Returns:

the page load strategy.

Type: 
string | undefined

getPlatform() → {string|undefined}

Returns:

the configured platform or undefined if not set.

Type: 
string | undefined

getProxy() → {proxy.Config|undefined}

Returns:

the configured proxy settings, or undefined if not set.

Type: 
proxy.Config | undefined

has(key) → {boolean}

Parameters:
NameTypeDescription
keystring

the key to test.

Returns:

whether this capability set has the specified key.

Type: 
boolean

keys() → (non-null) {Iterator.<string>}

Returns:

an iterator of the keys set.

Type: 
Iterator.<string>

merge(othernon-null) → (non-null) {Capabilities}

Merges another set of capabilities into this instance.

Parameters:
NameTypeDescription
otherCapabilities | Map.<String, ?> | Object.<string, ?>

The other set of capabilities to merge.

Returns:

A self reference.

Type: 
Capabilities

set(key, value) → (non-null) {Capabilities}

Parameters:
NameTypeDescription
keystring

The capability key.

value*

The capability value.

Throws:

If the key is not a string.

Type
TypeError
Returns:

A self reference.

Type: 
Capabilities

setAcceptInsecureCerts(accept) → (non-null) {Capabilities}

Sets whether a WebDriver session should implicitly accept self-signed, or other untrusted TLS certificates on navigation.

Parameters:
NameTypeDescription
acceptboolean

whether to accept insecure certs.

Returns:

a self reference.

Type: 
Capabilities

setAlertBehavior(behaviornullable) → (non-null) {Capabilities}

Sets the default action to take with an unexpected alert before returning an error. If unspecified, WebDriver will default to UserPromptHandler.DISMISS_AND_NOTIFY.

Parameters:
NameTypeAttributesDescription
behaviorUserPromptHandler<nullable>

The way WebDriver should respond to unhandled user prompts.

Returns:

A self reference.

Type: 
Capabilities

setBrowserName(name) → (non-null) {Capabilities}

Sets the name of the target browser.

Parameters:
NameTypeDescription
nameBrowser | string

the browser name.

Returns:

a self reference.

Type: 
Capabilities

setBrowserVersion(version) → (non-null) {Capabilities}

Sets the desired version of the target browser.

Parameters:
NameTypeDescription
versionstring

the desired version.

Returns:

a self reference.

Type: 
Capabilities

setLoggingPrefs(prefs) → (non-null) {Capabilities}

Sets the logging preferences. Preferences may be specified as a ./logging.Preferences instance, or as a map of log-type to log-level.

Parameters:
NameTypeDescription
prefs
Returns:

A self reference.

Type: 
Capabilities

setPageLoadStrategy(strategy) → (non-null) {Capabilities}

Sets the desired page loading strategy for a new WebDriver session.

Parameters:
NameTypeDescription
strategyPageLoadStrategy

the desired strategy.

Returns:

a self reference.

Type: 
Capabilities

setPlatform(platform) → (non-null) {Capabilities}

Sets the target platform.

Parameters:
NameTypeDescription
platformPlatform | string

the target platform.

Returns:

a self reference.

Type: 
Capabilities

setProxy(proxy) → (non-null) {Capabilities}

Sets the proxy configuration for this instance.

Parameters:
NameTypeDescription
proxyproxy.Config

The desired proxy configuration.

Returns:

A self reference.

Type: 
Capabilities

setStrictFileInteractability()

Sets the boolean flag configuration for this instance.

(static) chrome() → (non-null) {Capabilities}

Returns:

A basic set of capabilities for Chrome.

Type: 
Capabilities

(static) edge() → (non-null) {Capabilities}

Returns:

A basic set of capabilities for Microsoft Edge.

Type: 
Capabilities

(static) firefox() → (non-null) {Capabilities}

Returns:

A basic set of capabilities for Firefox.

Type: 
Capabilities

(static) ie() → (non-null) {Capabilities}

Returns:

A basic set of capabilities for Internet Explorer.

Type: 
Capabilities

(static) safari() → (non-null) {Capabilities}

Returns:

A basic set of capabilities for Safari.

Type: 
Capabilities
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Capabilities

Describes a set of capabilities for a WebDriver session.

Constructor

new Capabilities(otheropt)

Parameters:
NameTypeAttributesDescription
otherCapabilities | Map.<string, ?> | Object<optional>

Another set of capabilities to initialize this instance from.

Members

size

Methods

delete(key)

Deletes an entry from this set of capabilities.

Parameters:
NameTypeDescription
keystring

the capability key to delete.

get(key) → {T}

Parameters:
NameTypeDescription
keystring

the parameter key to get.

Returns:

the stored parameter value.

Type: 
T

getAcceptInsecureCerts() → {boolean}

Returns:

whether the session is configured to accept insecure TLS certificates.

Type: 
boolean

getAlertBehavior() → {UserPromptHandler|undefined}

Returns:

the behavior pattern for responding to unhandled user prompts, or undefined if not set.

Type: 
UserPromptHandler | undefined

getBrowserName() → {string|undefined}

Returns:

the configured browser name, or undefined if not set.

Type: 
string | undefined

getBrowserVersion() → {string|undefined}

Returns:

the configured browser version, or undefined if not set.

Type: 
string | undefined

getPageLoadStrategy() → {string|undefined}

Returns the configured page load strategy.

Returns:

the page load strategy.

Type: 
string | undefined

getPlatform() → {string|undefined}

Returns:

the configured platform or undefined if not set.

Type: 
string | undefined

getProxy() → {proxy.Config|undefined}

Returns:

the configured proxy settings, or undefined if not set.

Type: 
proxy.Config | undefined

has(key) → {boolean}

Parameters:
NameTypeDescription
keystring

the key to test.

Returns:

whether this capability set has the specified key.

Type: 
boolean

keys() → (non-null) {Iterator.<string>}

Returns:

an iterator of the keys set.

Type: 
Iterator.<string>

merge(othernon-null) → (non-null) {Capabilities}

Merges another set of capabilities into this instance.

Parameters:
NameTypeDescription
otherCapabilities | Map.<String, ?> | Object.<string, ?>

The other set of capabilities to merge.

Returns:

A self reference.

Type: 
Capabilities

set(key, value) → (non-null) {Capabilities}

Parameters:
NameTypeDescription
keystring

The capability key.

value*

The capability value.

Throws:

If the key is not a string.

Type
TypeError
Returns:

A self reference.

Type: 
Capabilities

setAcceptInsecureCerts(accept) → (non-null) {Capabilities}

Sets whether a WebDriver session should implicitly accept self-signed, or other untrusted TLS certificates on navigation.

Parameters:
NameTypeDescription
acceptboolean

whether to accept insecure certs.

Returns:

a self reference.

Type: 
Capabilities

setAlertBehavior(behaviornullable) → (non-null) {Capabilities}

Sets the default action to take with an unexpected alert before returning an error. If unspecified, WebDriver will default to UserPromptHandler.DISMISS_AND_NOTIFY.

Parameters:
NameTypeAttributesDescription
behaviorUserPromptHandler<nullable>

The way WebDriver should respond to unhandled user prompts.

Returns:

A self reference.

Type: 
Capabilities

setBrowserName(name) → (non-null) {Capabilities}

Sets the name of the target browser.

Parameters:
NameTypeDescription
nameBrowser | string

the browser name.

Returns:

a self reference.

Type: 
Capabilities

setBrowserVersion(version) → (non-null) {Capabilities}

Sets the desired version of the target browser.

Parameters:
NameTypeDescription
versionstring

the desired version.

Returns:

a self reference.

Type: 
Capabilities

setLoggingPrefs(prefs) → (non-null) {Capabilities}

Sets the logging preferences. Preferences may be specified as a ./logging.Preferences instance, or as a map of log-type to log-level.

Parameters:
NameTypeDescription
prefs
Returns:

A self reference.

Type: 
Capabilities

setPageLoadStrategy(strategy) → (non-null) {Capabilities}

Sets the desired page loading strategy for a new WebDriver session.

Parameters:
NameTypeDescription
strategyPageLoadStrategy

the desired strategy.

Returns:

a self reference.

Type: 
Capabilities

setPlatform(platform) → (non-null) {Capabilities}

Sets the target platform.

Parameters:
NameTypeDescription
platformPlatform | string

the target platform.

Returns:

a self reference.

Type: 
Capabilities

setProxy(proxy) → (non-null) {Capabilities}

Sets the proxy configuration for this instance.

Parameters:
NameTypeDescription
proxyproxy.Config

The desired proxy configuration.

Returns:

A self reference.

Type: 
Capabilities

setStrictFileInteractability()

Sets the boolean flag configuration for this instance.

(static) chrome() → (non-null) {Capabilities}

Returns:

A basic set of capabilities for Chrome.

Type: 
Capabilities

(static) edge() → (non-null) {Capabilities}

Returns:

A basic set of capabilities for Microsoft Edge.

Type: 
Capabilities

(static) firefox() → (non-null) {Capabilities}

Returns:

A basic set of capabilities for Firefox.

Type: 
Capabilities

(static) ie() → (non-null) {Capabilities}

Returns:

A basic set of capabilities for Internet Explorer.

Type: 
Capabilities

(static) safari() → (non-null) {Capabilities}

Returns:

A basic set of capabilities for Safari.

Type: 
Capabilities
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/CaptureScreenshotParameters.html b/docs/api/javascript/CaptureScreenshotParameters.html index cdc0f5c943d95..a7da7aedd5a4f 100644 --- a/docs/api/javascript/CaptureScreenshotParameters.html +++ b/docs/api/javascript/CaptureScreenshotParameters.html @@ -1,3 +1,3 @@ Class: CaptureScreenshotParameters
On this page

CaptureScreenshotParameters

Represents the optional parameters for capturing a screenshot. Described in https://w3c.github.io/webdriver-bidi/#command-browsingContext-captureScreenshot.

Constructor

new CaptureScreenshotParameters()

Methods

clipRectangle(clipRectangle) → {CaptureScreenshotParameters}

Sets the clip rectangle for capturing a screenshot.

Parameters:
NameTypeDescription
clipRectangleBoxClipRectangle | ElementClipRectangle

The clip rectangle to set.

Throws:

If the clipRectangle is not an instance of ClipRectangle.

Type
Error
Returns:
  • The current instance of the CaptureScreenshotParameters for chaining.
Type: 
CaptureScreenshotParameters

imageFormat(type, qualityopt) → {CaptureScreenshotParameters}

Sets the image format and quality for capturing a screenshot.

Parameters:
NameTypeAttributesDescription
typestring

The image format type.

qualitynumber<optional>

The image quality (optional).

Throws:

If the type is not a string or if the quality is not a number.

Type
Error
Returns:
  • The current instance of the CaptureScreenshotParameters for chaining.
Type: 
CaptureScreenshotParameters

origin(origin) → {CaptureScreenshotParameters}

Sets the origin for capturing the screenshot.

Parameters:
NameTypeDescription
originOrigin

The origin for capturing the screenshot. Must be one of Origin.VIEWPORT or Origin.DOCUMENT.

Throws:
  • If the provided origin is not valid.
Type
Error
Returns:
  • The current instance of the CaptureScreenshotParameters for chaining.
Type: 
CaptureScreenshotParameters
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

CaptureScreenshotParameters

Represents the optional parameters for capturing a screenshot. Described in https://w3c.github.io/webdriver-bidi/#command-browsingContext-captureScreenshot.

Constructor

new CaptureScreenshotParameters()

Methods

clipRectangle(clipRectangle) → {CaptureScreenshotParameters}

Sets the clip rectangle for capturing a screenshot.

Parameters:
NameTypeDescription
clipRectangleBoxClipRectangle | ElementClipRectangle

The clip rectangle to set.

Throws:

If the clipRectangle is not an instance of ClipRectangle.

Type
Error
Returns:
  • The current instance of the CaptureScreenshotParameters for chaining.
Type: 
CaptureScreenshotParameters

imageFormat(type, qualityopt) → {CaptureScreenshotParameters}

Sets the image format and quality for capturing a screenshot.

Parameters:
NameTypeAttributesDescription
typestring

The image format type.

qualitynumber<optional>

The image quality (optional).

Throws:

If the type is not a string or if the quality is not a number.

Type
Error
Returns:
  • The current instance of the CaptureScreenshotParameters for chaining.
Type: 
CaptureScreenshotParameters

origin(origin) → {CaptureScreenshotParameters}

Sets the origin for capturing the screenshot.

Parameters:
NameTypeDescription
originOrigin

The origin for capturing the screenshot. Must be one of Origin.VIEWPORT or Origin.DOCUMENT.

Throws:
  • If the provided origin is not valid.
Type
Error
Returns:
  • The current instance of the CaptureScreenshotParameters for chaining.
Type: 
CaptureScreenshotParameters
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ChannelValue.html b/docs/api/javascript/ChannelValue.html index 2916d088acbcc..21c0c6db36608 100644 --- a/docs/api/javascript/ChannelValue.html +++ b/docs/api/javascript/ChannelValue.html @@ -1,3 +1,3 @@ Class: ChannelValue
On this page

ChannelValue

Represents a channel value. Described in https://w3c.github.io/webdriver-bidi/#type-script-ChannelValue.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ChannelValue

Represents a channel value. Described in https://w3c.github.io/webdriver-bidi/#type-script-ChannelValue.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Client.html b/docs/api/javascript/Client.html index fca3643c852f9..dacff862e9d76 100644 --- a/docs/api/javascript/Client.html +++ b/docs/api/javascript/Client.html @@ -1,3 +1,3 @@ Interface: Client
On this page

Client

Handles sending HTTP messages to a remote end.

Methods

send(httpRequestnon-null) → (non-null) {Promise.<Response>}

Sends a request to the server. The client will automatically follow any redirects returned by the server, fulfilling the returned promise with the final response.

Parameters:
NameTypeDescription
httpRequestRequest

The request to send.

Returns:

A promise that will be fulfilled with the server's response.

Type: 
Promise.<Response>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Client

Handles sending HTTP messages to a remote end.

Methods

send(httpRequestnon-null) → (non-null) {Promise.<Response>}

Sends a request to the server. The client will automatically follow any redirects returned by the server, fulfilling the returned promise with the final response.

Parameters:
NameTypeDescription
httpRequestRequest

The request to send.

Returns:

A promise that will be fulfilled with the server's response.

Type: 
Promise.<Response>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ClientWindowInfo.html b/docs/api/javascript/ClientWindowInfo.html new file mode 100644 index 0000000000000..3e4ff91ab8ca0 --- /dev/null +++ b/docs/api/javascript/ClientWindowInfo.html @@ -0,0 +1,3 @@ +Class: ClientWindowInfo
On this page

ClientWindowInfo

new ClientWindowInfo(params)

Parameters:
NameTypeDescription
paramsObject

Window information parameters

Properties
NameTypeDescription
clientWindowstring

Window identifier

statestring

Window state from WindowState

widthnumber

Window width

heightnumber

Window height

xnumber

Window x coordinate

ynumber

Window y coordinate

activeboolean

Whether window is active and can receive keyboard input

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ClipRectangle.html b/docs/api/javascript/ClipRectangle.html index d2714b38f49a1..d250f1a01a47e 100644 --- a/docs/api/javascript/ClipRectangle.html +++ b/docs/api/javascript/ClipRectangle.html @@ -1,3 +1,3 @@ Class: ClipRectangle
On this page

ClipRectangle

Represents a clip rectangle. Described in https://w3c.github.io/webdriver-bidi/#command-browsingContext-captureScreenshot.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ClipRectangle

Represents a clip rectangle. Described in https://w3c.github.io/webdriver-bidi/#command-browsingContext-captureScreenshot.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Command.html b/docs/api/javascript/Command.html index 6d594d84ef05d..852da7bc87c77 100644 --- a/docs/api/javascript/Command.html +++ b/docs/api/javascript/Command.html @@ -1,3 +1,3 @@ Class: Command
On this page

Command

Represents a command running in a sub-process.

Constructor

new Command(resultnon-null, onKill)

Parameters:
NameTypeDescription
resultPromise.<!Result>

The command result.

onKillfunction

The function to call when #kill() is called.

Methods

getName() → {string}

Returns:

This command's name.

Type: 
string

getParameter(key) → {*}

Returns a named command parameter.

Parameters:
NameTypeDescription
keystring

The parameter key to look up.

Returns:

The parameter value, or undefined if it has not been set.

Type: 
*

getParameters() → (non-null) {Object.<*>}

Returns:

The parameters to send with this command.

Type: 
Object.<*>

kill(opt_signalopt)

Sends a signal to the underlying process.

Parameters:
NameTypeAttributesDescription
opt_signalstring<optional>

The signal to send; defaults to SIGTERM.

result() → (non-null) {Promise.<!Result>}

Returns:

A promise for the result of this command.

Type: 
Promise.<!Result>

setParameter(name, value) → (non-null) {Command}

Sets a parameter to send with this command.

Parameters:
NameTypeDescription
namestring

The parameter name.

value*

The parameter value.

Returns:

A self reference.

Type: 
Command

setParameters(parametersnon-null) → (non-null) {Command}

Sets the parameters for this command.

Parameters:
NameTypeDescription
parametersObject.<*>

The command parameters.

Returns:

A self reference.

Type: 
Command

Command

Describes a command to execute.

Constructor

new Command(name)

Parameters:
NameTypeDescription
namestring

The name of this command.

Methods

getName() → {string}

Returns:

This command's name.

Type: 
string

getParameter(key) → {*}

Returns a named command parameter.

Parameters:
NameTypeDescription
keystring

The parameter key to look up.

Returns:

The parameter value, or undefined if it has not been set.

Type: 
*

getParameters() → (non-null) {Object.<*>}

Returns:

The parameters to send with this command.

Type: 
Object.<*>

kill(opt_signalopt)

Sends a signal to the underlying process.

Parameters:
NameTypeAttributesDescription
opt_signalstring<optional>

The signal to send; defaults to SIGTERM.

result() → (non-null) {Promise.<!Result>}

Returns:

A promise for the result of this command.

Type: 
Promise.<!Result>

setParameter(name, value) → (non-null) {Command}

Sets a parameter to send with this command.

Parameters:
NameTypeDescription
namestring

The parameter name.

value*

The parameter value.

Returns:

A self reference.

Type: 
Command

setParameters(parametersnon-null) → (non-null) {Command}

Sets the parameters for this command.

Parameters:
NameTypeDescription
parametersObject.<*>

The command parameters.

Returns:

A self reference.

Type: 
Command
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Command

Represents a command running in a sub-process.

Constructor

new Command(resultnon-null, onKill)

Parameters:
NameTypeDescription
resultPromise.<!Result>

The command result.

onKillfunction

The function to call when #kill() is called.

Methods

getName() → {string}

Returns:

This command's name.

Type: 
string

getParameter(key) → {*}

Returns a named command parameter.

Parameters:
NameTypeDescription
keystring

The parameter key to look up.

Returns:

The parameter value, or undefined if it has not been set.

Type: 
*

getParameters() → (non-null) {Object.<*>}

Returns:

The parameters to send with this command.

Type: 
Object.<*>

kill(opt_signalopt)

Sends a signal to the underlying process.

Parameters:
NameTypeAttributesDescription
opt_signalstring<optional>

The signal to send; defaults to SIGTERM.

result() → (non-null) {Promise.<!Result>}

Returns:

A promise for the result of this command.

Type: 
Promise.<!Result>

setParameter(name, value) → (non-null) {Command}

Sets a parameter to send with this command.

Parameters:
NameTypeDescription
namestring

The parameter name.

value*

The parameter value.

Returns:

A self reference.

Type: 
Command

setParameters(parametersnon-null) → (non-null) {Command}

Sets the parameters for this command.

Parameters:
NameTypeDescription
parametersObject.<*>

The command parameters.

Returns:

A self reference.

Type: 
Command

Command

Describes a command to execute.

Constructor

new Command(name)

Parameters:
NameTypeDescription
namestring

The name of this command.

Methods

getName() → {string}

Returns:

This command's name.

Type: 
string

getParameter(key) → {*}

Returns a named command parameter.

Parameters:
NameTypeDescription
keystring

The parameter key to look up.

Returns:

The parameter value, or undefined if it has not been set.

Type: 
*

getParameters() → (non-null) {Object.<*>}

Returns:

The parameters to send with this command.

Type: 
Object.<*>

kill(opt_signalopt)

Sends a signal to the underlying process.

Parameters:
NameTypeAttributesDescription
opt_signalstring<optional>

The signal to send; defaults to SIGTERM.

result() → (non-null) {Promise.<!Result>}

Returns:

A promise for the result of this command.

Type: 
Promise.<!Result>

setParameter(name, value) → (non-null) {Command}

Sets a parameter to send with this command.

Parameters:
NameTypeDescription
namestring

The parameter name.

value*

The parameter value.

Returns:

A self reference.

Type: 
Command

setParameters(parametersnon-null) → (non-null) {Command}

Sets the parameters for this command.

Parameters:
NameTypeDescription
parametersObject.<*>

The command parameters.

Returns:

A self reference.

Type: 
Command
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Condition.html b/docs/api/javascript/Condition.html index d13eeb21fd7c7..b43f4054dbe4f 100644 --- a/docs/api/javascript/Condition.html +++ b/docs/api/javascript/Condition.html @@ -1,3 +1,3 @@ Class: Condition
On this page

Condition

Defines a condition for use with WebDriver's wait command.

Constructor

new Condition(message, fn)

Parameters:
NameTypeDescription
messagestring

A descriptive error message. Should complete the sentence "Waiting [...]"

fnfunction

The condition function to evaluate on each iteration of the wait loop.

Members

fn :function

Type:
  • function

Methods

description() → {string}

Returns:

A description of this condition.

Type: 
string
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Condition

Defines a condition for use with WebDriver's wait command.

Constructor

new Condition(message, fn)

Parameters:
NameTypeDescription
messagestring

A descriptive error message. Should complete the sentence "Waiting [...]"

fnfunction

The condition function to evaluate on each iteration of the wait loop.

Members

fn :function

Type:
  • function

Methods

description() → {string}

Returns:

A description of this condition.

Type: 
string
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ConsoleLogEntry.html b/docs/api/javascript/ConsoleLogEntry.html index 623d88ca81a07..15839e480d19c 100644 --- a/docs/api/javascript/ConsoleLogEntry.html +++ b/docs/api/javascript/ConsoleLogEntry.html @@ -1,3 +1,3 @@ Class: ConsoleLogEntry
On this page

ConsoleLogEntry

Represents a log entry for console logs.

Constructor

new ConsoleLogEntry()

Extends

Members

args

Gets the arguments associated with the log entry.

level

Gets the log level.

method

Gets the method associated with the log entry.

stackTrace

Gets the log stack trace.

text

Gets the log text.

timeStamp

Gets the log timestamp.

type

Gets the log type.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ConsoleLogEntry

Represents a log entry for console logs.

Constructor

new ConsoleLogEntry()

Extends

Members

args

Gets the arguments associated with the log entry.

level

Gets the log level.

method

Gets the method associated with the log entry.

stackTrace

Gets the log stack trace.

text

Gets the log text.

timeStamp

Gets the log timestamp.

type

Gets the log type.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ContinueRequestParameters.html b/docs/api/javascript/ContinueRequestParameters.html index d1681decc0a91..31fa5a577f3ee 100644 --- a/docs/api/javascript/ContinueRequestParameters.html +++ b/docs/api/javascript/ContinueRequestParameters.html @@ -1,3 +1,3 @@ Class: ContinueRequestParameters
On this page

ContinueRequestParameters

Represents the parameters for a continue request command. Described in https://w3c.github.io/webdriver-bidi/#command-network-continueRequest.

Constructor

new ContinueRequestParameters()

Methods

body(value) → {ContinueRequestParameters}

Sets the body value for the request.

Parameters:
NameTypeDescription
valueBytesValue

The value to set as the body. Must be an instance of BytesValue.

Throws:
  • If the value is not an instance of BytesValue.
Type
Error
Returns:
  • The current instance of the ContinueRequestParameters for chaining.
Type: 
ContinueRequestParameters

cookies(cookieHeaders) → {ContinueRequestParameters}

Sets the cookies for the request.

Parameters:
NameTypeDescription
cookieHeadersArray.<Header>

An array of cookie headers.

Throws:
  • If a cookie header is not an instance of Header.
Type
Error
Returns:
  • The current instance of the ContinueRequestParameters for chaining.
Type: 
ContinueRequestParameters

headers(headers) → {ContinueRequestParameters}

Sets the headers for the request.

Parameters:
NameTypeDescription
headersArray.<Header>

An array of Header objects.

Throws:
  • If the header value is not an instance of Header.
Type
Error
Returns:
  • The current instance of the ContinueRequestParameters for chaining.
Type: 
ContinueRequestParameters

method(method) → {ContinueRequestParameters}

Sets the HTTP method for the request.

Parameters:
NameTypeDescription
methodstring

The HTTP method to be set.

Throws:
  • If the method parameter is not a string.
Type
Error
Returns:
  • The updated continueRequestParameters object.
Type: 
ContinueRequestParameters

url(url) → {ContinueRequestParameters}

Sets the URL for the request.

Parameters:
NameTypeDescription
urlstring

The URL to set for the request.

Throws:
  • If the url parameter is not a string.
Type
Error
Returns:
  • The current instance of the ContinueRequestParameters for chaining.
Type: 
ContinueRequestParameters
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ContinueRequestParameters

Represents the parameters for a continue request command. Described in https://w3c.github.io/webdriver-bidi/#command-network-continueRequest.

Constructor

new ContinueRequestParameters()

Methods

body(value) → {ContinueRequestParameters}

Sets the body value for the request.

Parameters:
NameTypeDescription
valueBytesValue

The value to set as the body. Must be an instance of BytesValue.

Throws:
  • If the value is not an instance of BytesValue.
Type
Error
Returns:
  • The current instance of the ContinueRequestParameters for chaining.
Type: 
ContinueRequestParameters

cookies(cookieHeaders) → {ContinueRequestParameters}

Sets the cookies for the request.

Parameters:
NameTypeDescription
cookieHeadersArray.<Header>

An array of cookie headers.

Throws:
  • If a cookie header is not an instance of Header.
Type
Error
Returns:
  • The current instance of the ContinueRequestParameters for chaining.
Type: 
ContinueRequestParameters

headers(headers) → {ContinueRequestParameters}

Sets the headers for the request.

Parameters:
NameTypeDescription
headersArray.<Header>

An array of Header objects.

Throws:
  • If the header value is not an instance of Header.
Type
Error
Returns:
  • The current instance of the ContinueRequestParameters for chaining.
Type: 
ContinueRequestParameters

method(method) → {ContinueRequestParameters}

Sets the HTTP method for the request.

Parameters:
NameTypeDescription
methodstring

The HTTP method to be set.

Throws:
  • If the method parameter is not a string.
Type
Error
Returns:
  • The updated continueRequestParameters object.
Type: 
ContinueRequestParameters

url(url) → {ContinueRequestParameters}

Sets the URL for the request.

Parameters:
NameTypeDescription
urlstring

The URL to set for the request.

Throws:
  • If the url parameter is not a string.
Type
Error
Returns:
  • The current instance of the ContinueRequestParameters for chaining.
Type: 
ContinueRequestParameters
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ContinueResponseParameters.html b/docs/api/javascript/ContinueResponseParameters.html index f98369f89b4e9..731b28f7fd984 100644 --- a/docs/api/javascript/ContinueResponseParameters.html +++ b/docs/api/javascript/ContinueResponseParameters.html @@ -1,3 +1,3 @@ Class: ContinueResponseParameters
On this page

ContinueResponseParameters

Represents the parameters for a continue response. Described in https://w3c.github.io/webdriver-bidi/#command-network-continueResponse.

Constructor

new ContinueResponseParameters()

Methods

cookies(cookieHeaders) → {ContinueResponseParameters}

Sets the cookies for the response.

Parameters:
NameTypeDescription
cookieHeadersArray.<Header>

The array of cookie headers.

Throws:
  • If the cookieHeader is not an instance of Header.
Type
Error
Returns:
  • The current instance of the ContinueResponseParameters for chaining.
Type: 
ContinueResponseParameters

credentials(username, password) → {ContinueResponseParameters}

Sets the credentials for authentication.

Parameters:
NameTypeDescription
usernamestring

The username for authentication.

passwordstring

The password for authentication.

Throws:

If username or password is not a string.

Type
Error
Returns:

The current instance of the ContinueResponseParameters for chaining.

Type: 
ContinueResponseParameters

headers(headers) → {ContinueResponseParameters}

Sets the headers for the response.

Parameters:
NameTypeDescription
headersArray.<Header>

An array of Header objects representing the headers.

Throws:
  • If the header value is not an instance of Header.
Type
Error
Returns:
  • The current instance of the ContinueResponseParameters for chaining.
Type: 
ContinueResponseParameters

reasonPhrase(reasonPhrase) → {ContinueResponseParameters}

Sets the reason phrase for the response.

Parameters:
NameTypeDescription
reasonPhrasestring

The reason phrase for the response.

Throws:
  • If the reason phrase is not a string.
Type
Error
Returns:
  • The current instance of the ContinueResponseParameters for chaining.
Type: 
ContinueResponseParameters

statusCode(statusCode) → {ContinueResponseParameters}

Sets the status code for the response.

Parameters:
NameTypeDescription
statusCodenumber

The status code to set.

Throws:
  • If the statusCode parameter is not an integer.
Type
Error
Returns:
  • The current instance of the ContinueResponseParameters for chaining.
Type: 
ContinueResponseParameters
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ContinueResponseParameters

Represents the parameters for a continue response. Described in https://w3c.github.io/webdriver-bidi/#command-network-continueResponse.

Constructor

new ContinueResponseParameters()

Methods

cookies(cookieHeaders) → {ContinueResponseParameters}

Sets the cookies for the response.

Parameters:
NameTypeDescription
cookieHeadersArray.<Header>

The array of cookie headers.

Throws:
  • If the cookieHeader is not an instance of Header.
Type
Error
Returns:
  • The current instance of the ContinueResponseParameters for chaining.
Type: 
ContinueResponseParameters

credentials(username, password) → {ContinueResponseParameters}

Sets the credentials for authentication.

Parameters:
NameTypeDescription
usernamestring

The username for authentication.

passwordstring

The password for authentication.

Throws:

If username or password is not a string.

Type
Error
Returns:

The current instance of the ContinueResponseParameters for chaining.

Type: 
ContinueResponseParameters

headers(headers) → {ContinueResponseParameters}

Sets the headers for the response.

Parameters:
NameTypeDescription
headersArray.<Header>

An array of Header objects representing the headers.

Throws:
  • If the header value is not an instance of Header.
Type
Error
Returns:
  • The current instance of the ContinueResponseParameters for chaining.
Type: 
ContinueResponseParameters

reasonPhrase(reasonPhrase) → {ContinueResponseParameters}

Sets the reason phrase for the response.

Parameters:
NameTypeDescription
reasonPhrasestring

The reason phrase for the response.

Throws:
  • If the reason phrase is not a string.
Type
Error
Returns:
  • The current instance of the ContinueResponseParameters for chaining.
Type: 
ContinueResponseParameters

statusCode(statusCode) → {ContinueResponseParameters}

Sets the status code for the response.

Parameters:
NameTypeDescription
statusCodenumber

The status code to set.

Throws:
  • If the statusCode parameter is not an integer.
Type
Error
Returns:
  • The current instance of the ContinueResponseParameters for chaining.
Type: 
ContinueResponseParameters
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Cookie.html b/docs/api/javascript/Cookie.html index d990d6e2b5531..b791a2498726e 100644 --- a/docs/api/javascript/Cookie.html +++ b/docs/api/javascript/Cookie.html @@ -1,3 +1,3 @@ Class: Cookie
On this page

Cookie

Represents a cookie. Described in https://w3c.github.io/webdriver-bidi/#type-network-Cookie.

Constructor

Members

domain

Gets the domain of the cookie.

expires

Gets the expiration date of the cookie.

httpOnly

Checks if the cookie is HTTP-only.

name

Gets the name of the cookie.

path

Gets the path of the cookie.

sameSite

Gets the same-site attribute of the cookie.

secure

Checks if the cookie is secure.

size

Gets the size of the cookie.

value

Gets the value of the cookie.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Cookie

Represents a cookie. Described in https://w3c.github.io/webdriver-bidi/#type-network-Cookie.

Constructor

Members

domain

Gets the domain of the cookie.

expires

Gets the expiration date of the cookie.

httpOnly

Checks if the cookie is HTTP-only.

name

Gets the name of the cookie.

path

Gets the path of the cookie.

sameSite

Gets the same-site attribute of the cookie.

secure

Checks if the cookie is secure.

size

Gets the size of the cookie.

value

Gets the value of the cookie.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/CookieFilter.html b/docs/api/javascript/CookieFilter.html index 4fdd11b89f629..4947321b5fe18 100644 --- a/docs/api/javascript/CookieFilter.html +++ b/docs/api/javascript/CookieFilter.html @@ -1,3 +1,3 @@ Class: CookieFilter
On this page

CookieFilter

Represents a filter for fetching cookies. Described in https://w3c.github.io/webdriver-bidi/#command-storage-getCookies

Constructor

new CookieFilter()

Methods

domain(domain) → {CookieFilter}

Sets the domain for the cookie.

Parameters:
NameTypeDescription
domainstring

The domain to set.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

expiry(expiry) → {CookieFilter}

Sets the expiry value.

Parameters:
NameTypeDescription
expirynumber

The expiry value.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

httpOnly(httpOnly) → {CookieFilter}

Sets the httpOnly flag for the cookie filter.

Parameters:
NameTypeDescription
httpOnlyboolean

The value to set for the httpOnly flag.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

name(name) → {CookieFilter}

Sets the name of the cookie.

Parameters:
NameTypeDescription
namestring

The name of the cookie.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

path(path) → {CookieFilter}

Sets the url path for the cookie to be fetched.

Parameters:
NameTypeDescription
pathstring

The url path for the cookie to be fetched.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

sameSite(sameSite) → {CookieFilter}

Sets the SameSite attribute for the cookie.

Parameters:
NameTypeDescription
sameSiteSameSite

The SameSite value to be set for the cookie.

Throws:
  • If the provided sameSite value is not an instance of SameSite.
Type
Error
Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

secure(secure) → {CookieFilter}

Sets the flag to fetch secure cookies.

Parameters:
NameTypeDescription
secureboolean

Whether the cookie fetched should be secure only or not.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

size(size) → {CookieFilter}

Sets the size of the cookie to be fetched.

Parameters:
NameTypeDescription
sizenumber

The size of the cookie.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

value(value) → {CookieFilter}

Sets the value of the cookie.

Parameters:
NameTypeDescription
valueBytesValue

The value to be set. Must be an instance of BytesValue.

Throws:
  • If the value is not an instance of BytesValue.
Type
Error
Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

CookieFilter

Represents a filter for fetching cookies. Described in https://w3c.github.io/webdriver-bidi/#command-storage-getCookies

Constructor

new CookieFilter()

Methods

domain(domain) → {CookieFilter}

Sets the domain for the cookie.

Parameters:
NameTypeDescription
domainstring

The domain to set.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

expiry(expiry) → {CookieFilter}

Sets the expiry value.

Parameters:
NameTypeDescription
expirynumber

The expiry value.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

httpOnly(httpOnly) → {CookieFilter}

Sets the httpOnly flag for the cookie filter.

Parameters:
NameTypeDescription
httpOnlyboolean

The value to set for the httpOnly flag.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

name(name) → {CookieFilter}

Sets the name of the cookie.

Parameters:
NameTypeDescription
namestring

The name of the cookie.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

path(path) → {CookieFilter}

Sets the url path for the cookie to be fetched.

Parameters:
NameTypeDescription
pathstring

The url path for the cookie to be fetched.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

sameSite(sameSite) → {CookieFilter}

Sets the SameSite attribute for the cookie.

Parameters:
NameTypeDescription
sameSiteSameSite

The SameSite value to be set for the cookie.

Throws:
  • If the provided sameSite value is not an instance of SameSite.
Type
Error
Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

secure(secure) → {CookieFilter}

Sets the flag to fetch secure cookies.

Parameters:
NameTypeDescription
secureboolean

Whether the cookie fetched should be secure only or not.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

size(size) → {CookieFilter}

Sets the size of the cookie to be fetched.

Parameters:
NameTypeDescription
sizenumber

The size of the cookie.

Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

value(value) → {CookieFilter}

Sets the value of the cookie.

Parameters:
NameTypeDescription
valueBytesValue

The value to be set. Must be an instance of BytesValue.

Throws:
  • If the value is not an instance of BytesValue.
Type
Error
Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/CreateContextParameters.html b/docs/api/javascript/CreateContextParameters.html index a1f72bfeac7c4..3c6d25400187d 100644 --- a/docs/api/javascript/CreateContextParameters.html +++ b/docs/api/javascript/CreateContextParameters.html @@ -1,3 +1,3 @@ Class: CreateContextParameters
On this page

CreateContextParameters

Represents a set of parameters for creating a context. Described in https://w3c.github.io/webdriver-bidi/#command-browsingContext-create.

Constructor

new CreateContextParameters()

Methods

background(background) → {CreateContextParameters}

Sets the background parameter.

Parameters:
NameTypeDescription
backgroundboolean

The background value to set.

Throws:
  • If the background parameter is not a boolean.
Type
Error
Returns:
  • The updated instance of CreateContextParameters for chaining.
Type: 
CreateContextParameters

referenceContext(id) → {CreateContextParameters}

Sets the reference context.

Parameters:
NameTypeDescription
idstring

The ID of the reference context.

Throws:
  • If the provided ID is not a string.
Type
Error
Returns:
  • The updated instance of CreateContextParameters for chaining.
Type: 
CreateContextParameters

userContext(userContext) → {CreateContextParameters}

Sets the user context.

Parameters:
NameTypeDescription
userContextstring

The user context to set.

Throws:
  • If the userContext parameter is not a string.
Type
Error
Returns:
  • The updated instance of CreateContextParameters for chaining.
Type: 
CreateContextParameters
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

CreateContextParameters

Represents a set of parameters for creating a context. Described in https://w3c.github.io/webdriver-bidi/#command-browsingContext-create.

Constructor

new CreateContextParameters()

Methods

background(background) → {CreateContextParameters}

Sets the background parameter.

Parameters:
NameTypeDescription
backgroundboolean

The background value to set.

Throws:
  • If the background parameter is not a boolean.
Type
Error
Returns:
  • The updated instance of CreateContextParameters for chaining.
Type: 
CreateContextParameters

referenceContext(id) → {CreateContextParameters}

Sets the reference context.

Parameters:
NameTypeDescription
idstring

The ID of the reference context.

Throws:
  • If the provided ID is not a string.
Type
Error
Returns:
  • The updated instance of CreateContextParameters for chaining.
Type: 
CreateContextParameters

userContext(userContext) → {CreateContextParameters}

Sets the user context.

Parameters:
NameTypeDescription
userContextstring

The user context to set.

Throws:
  • If the userContext parameter is not a string.
Type
Error
Returns:
  • The updated instance of CreateContextParameters for chaining.
Type: 
CreateContextParameters
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Credential.html b/docs/api/javascript/Credential.html index 074bf7c6ea8bc..b4df15967a672 100644 --- a/docs/api/javascript/Credential.html +++ b/docs/api/javascript/Credential.html @@ -1,3 +1,3 @@ Class: Credential
On this page

Credential

A credential stored in a virtual authenticator.

Methods

createNonResidentCredential(id, rpId, privateKey, signCount)

Creates a non-resident (i.e. stateless) credential.

Parameters:
NameTypeDescription
id

Unique base64 encoded string.

rpId

Relying party identifier.

privateKey

Base64 encoded PKCS

signCount

initial value for a signature counter.

Deprecated
  • This method has been made static. Call it with class name. Example, Credential.createNonResidentCredential()
Returns:

A non-resident credential

createResidentCredential(id, rpId, userHandle, privateKey, signCount)

Creates a resident (i.e. stateless) credential.

Parameters:
NameTypeDescription
id

Unique base64 encoded string.

rpId

Relying party identifier.

userHandle

userHandle associated to the credential. Must be Base64 encoded string.

privateKey

Base64 encoded PKCS

signCount

initial value for a signature counter.

Deprecated
  • This method has been made static. Call it with class name. Example, Credential.createResidentCredential()
Returns:

A resident credential

fromDict()

Creates a credential from a map.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Credential

A credential stored in a virtual authenticator.

Methods

createNonResidentCredential(id, rpId, privateKey, signCount)

Creates a non-resident (i.e. stateless) credential.

Parameters:
NameTypeDescription
id

Unique base64 encoded string.

rpId

Relying party identifier.

privateKey

Base64 encoded PKCS

signCount

initial value for a signature counter.

Deprecated
  • This method has been made static. Call it with class name. Example, Credential.createNonResidentCredential()
Returns:

A non-resident credential

createResidentCredential(id, rpId, userHandle, privateKey, signCount)

Creates a resident (i.e. stateless) credential.

Parameters:
NameTypeDescription
id

Unique base64 encoded string.

rpId

Relying party identifier.

userHandle

userHandle associated to the credential. Must be Base64 encoded string.

privateKey

Base64 encoded PKCS

signCount

initial value for a signature counter.

Deprecated
  • This method has been made static. Call it with class name. Example, Credential.createResidentCredential()
Returns:

A resident credential

fromDict()

Creates a credential from a map.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/DetachedShadowRootError.html b/docs/api/javascript/DetachedShadowRootError.html index 7ecd39c875e43..839136b2a05be 100644 --- a/docs/api/javascript/DetachedShadowRootError.html +++ b/docs/api/javascript/DetachedShadowRootError.html @@ -1,3 +1,3 @@ Class: DetachedShadowRootError
On this page

DetachedShadowRootError

Indicates the shadow root is no longer attached to the DOM

Constructor

new DetachedShadowRootError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

DetachedShadowRootError

Indicates the shadow root is no longer attached to the DOM

Constructor

new DetachedShadowRootError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Device.html b/docs/api/javascript/Device.html index d7128dd6944e7..21e2411a610e7 100644 --- a/docs/api/javascript/Device.html +++ b/docs/api/javascript/Device.html @@ -1,3 +1,3 @@ Class: Device
On this page

Device

Represents a user input device.

Constructor

(abstract) new Device(type, id)

Parameters:
NameTypeDescription
typeDevice.Type

the input type.

idstring

a unique ID for this device.

Members

(static) Type :string

Device types supported by the WebDriver protocol.

Type:
  • string
Properties
NameTypeDescription
KEYstring
NONEstring
POINTERstring
WHEELstring

Methods

toJSON() → (non-null) {Object}

Returns:

the JSON encoding for this device.

Type: 
Object
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Device

Represents a user input device.

Constructor

(abstract) new Device(type, id)

Parameters:
NameTypeDescription
typeDevice.Type

the input type.

idstring

a unique ID for this device.

Members

(static) Type :string

Device types supported by the WebDriver protocol.

Type:
  • string
Properties
NameTypeDescription
KEYstring
NONEstring
POINTERstring
WHEELstring

Methods

toJSON() → (non-null) {Object}

Returns:

the JSON encoding for this device.

Type: 
Object
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/DriverService.Builder.html b/docs/api/javascript/DriverService.Builder.html index ff8165973b744..e1f28c75bb31b 100644 --- a/docs/api/javascript/DriverService.Builder.html +++ b/docs/api/javascript/DriverService.Builder.html @@ -1,3 +1,3 @@ Class: Builder
On this page

DriverService. Builder

Creates DriverService objects that manage a WebDriver server in a child process.

Constructor

new Builder(exe)

Parameters:
NameTypeDescription
exestring

Path to the executable to use. This executable must accept the --port flag for defining the port to start the server on.

Throws:

If the provided executable path does not exist.

Type
Error

Methods

addArguments(…var_args) → (non-null) {THIS}

Define additional command line arguments to use when starting the server.

This:
  • {THIS}
Parameters:
NameTypeAttributesDescription
var_argsCommandLineFlag<repeatable>

The arguments to include.

Returns:

A self reference.

Type: 
THIS

build() → (non-null) {DriverService}

Creates a new DriverService using this instance's current configuration.

Returns:

A new driver service.

Type: 
DriverService

setEnvironment(env) → (non-null) {DriverService.Builder}

Defines the environment to start the server under. This setting will be inherited by every browser session started by the server. By default, the server will inherit the enviroment of the current process.

Parameters:
NameTypeDescription
envMap.<string, string> | Object.<string, string> | null

The desired environment to use, or null if the server should inherit the current environment.

Returns:

A self reference.

Type: 
DriverService.Builder

setHostname(hostname) → (non-null) {DriverService.Builder}

Sets the host name to access the server on. If specified, the loopback setting will be ignored.

Parameters:
NameTypeDescription
hostnamestring
Returns:

A self reference.

Type: 
DriverService.Builder

setLoopback(loopback) → (non-null) {DriverService.Builder}

Sets whether the service should be accessed at this host's loopback address.

Parameters:
NameTypeDescription
loopbackboolean
Returns:

A self reference.

Type: 
DriverService.Builder

setPath(basePathnullable) → (non-null) {DriverService.Builder}

Sets the base path for WebDriver REST commands (e.g. "/wd/hub"). By default, the driver will accept commands relative to "/".

Parameters:
NameTypeAttributesDescription
basePathstring<nullable>

The base path to use, or null to use the default.

Returns:

A self reference.

Type: 
DriverService.Builder

setPort(port) → (non-null) {DriverService.Builder}

Sets the port to start the server on.

Parameters:
NameTypeDescription
portnumber

The port to use, or 0 for any free port.

Throws:

If an invalid port is specified.

Type
Error
Returns:

A self reference.

Type: 
DriverService.Builder

setStdio(config) → (non-null) {DriverService.Builder}

IO configuration for the spawned server process. For more information, refer to the documentation of child_process.spawn.

Parameters:
NameTypeDescription
configStdIoOptions

The desired IO configuration.

Returns:

A self reference.

Type: 
DriverService.Builder
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

DriverService. Builder

Creates DriverService objects that manage a WebDriver server in a child process.

Constructor

new Builder(exe)

Parameters:
NameTypeDescription
exestring

Path to the executable to use. This executable must accept the --port flag for defining the port to start the server on.

Throws:

If the provided executable path does not exist.

Type
Error

Methods

addArguments(…var_args) → (non-null) {THIS}

Define additional command line arguments to use when starting the server.

This:
  • {THIS}
Parameters:
NameTypeAttributesDescription
var_argsCommandLineFlag<repeatable>

The arguments to include.

Returns:

A self reference.

Type: 
THIS

build() → (non-null) {DriverService}

Creates a new DriverService using this instance's current configuration.

Returns:

A new driver service.

Type: 
DriverService

setEnvironment(env) → (non-null) {DriverService.Builder}

Defines the environment to start the server under. This setting will be inherited by every browser session started by the server. By default, the server will inherit the enviroment of the current process.

Parameters:
NameTypeDescription
envMap.<string, string> | Object.<string, string> | null

The desired environment to use, or null if the server should inherit the current environment.

Returns:

A self reference.

Type: 
DriverService.Builder

setHostname(hostname) → (non-null) {DriverService.Builder}

Sets the host name to access the server on. If specified, the loopback setting will be ignored.

Parameters:
NameTypeDescription
hostnamestring
Returns:

A self reference.

Type: 
DriverService.Builder

setLoopback(loopback) → (non-null) {DriverService.Builder}

Sets whether the service should be accessed at this host's loopback address.

Parameters:
NameTypeDescription
loopbackboolean
Returns:

A self reference.

Type: 
DriverService.Builder

setPath(basePathnullable) → (non-null) {DriverService.Builder}

Sets the base path for WebDriver REST commands (e.g. "/wd/hub"). By default, the driver will accept commands relative to "/".

Parameters:
NameTypeAttributesDescription
basePathstring<nullable>

The base path to use, or null to use the default.

Returns:

A self reference.

Type: 
DriverService.Builder

setPort(port) → (non-null) {DriverService.Builder}

Sets the port to start the server on.

Parameters:
NameTypeDescription
portnumber

The port to use, or 0 for any free port.

Throws:

If an invalid port is specified.

Type
Error
Returns:

A self reference.

Type: 
DriverService.Builder

setStdio(config) → (non-null) {DriverService.Builder}

IO configuration for the spawned server process. For more information, refer to the documentation of child_process.spawn.

Parameters:
NameTypeDescription
configStdIoOptions

The desired IO configuration.

Returns:

A self reference.

Type: 
DriverService.Builder
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/DriverService.html b/docs/api/javascript/DriverService.html index 3ddbcf6b5116e..1ab5ffab02b0f 100644 --- a/docs/api/javascript/DriverService.html +++ b/docs/api/javascript/DriverService.html @@ -1,3 +1,3 @@ Class: DriverService
On this page

DriverService

Manages the life and death of a native executable WebDriver server.

It is expected that the driver server implements the https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol. Furthermore, the managed server should support multiple concurrent sessions, so that this class may be reused for multiple clients.

Constructor

new DriverService(executable, optionsnon-null)

Parameters:
NameTypeDescription
executablestring

Path to the executable to run.

optionsServiceOptions

Configuration options for the service.

Classes

Builder

Members

(static, constant) DEFAULT_START_TIMEOUT_MS :number

The default amount of time, in milliseconds, to wait for the server to start.

Type:
  • number

Methods

address() → (non-null) {Promise.<string>}

Throws:

If the server has not been started.

Type
Error
Returns:

A promise that resolves to the server's address.

Type: 
Promise.<string>

isRunning() → {boolean}

Returns whether the underlying process is still running. This does not take into account whether the process is in the process of shutting down.

Returns:

Whether the underlying service process is running.

Type: 
boolean

kill() → (non-null) {Promise}

Stops the service if it is not currently running. This function will kill the server immediately. To synchronize with the active control flow, use #stop().

Returns:

A promise that will be resolved when the server has been stopped.

Type: 
Promise

start(opt_timeoutMsopt) → (non-null) {Promise.<string>}

Starts the server if it is not already running.

Parameters:
NameTypeAttributesDescription
opt_timeoutMsnumber<optional>

How long to wait, in milliseconds, for the server to start accepting requests. Defaults to 30 seconds.

Returns:

A promise that will resolve to the server's base URL when it has started accepting requests. If the timeout expires before the server has started, the promise will be rejected.

Type: 
Promise.<string>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

DriverService

Manages the life and death of a native executable WebDriver server.

It is expected that the driver server implements the https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol. Furthermore, the managed server should support multiple concurrent sessions, so that this class may be reused for multiple clients.

Constructor

new DriverService(executable, optionsnon-null)

Parameters:
NameTypeDescription
executablestring

Path to the executable to run.

optionsServiceOptions

Configuration options for the service.

Classes

Builder

Members

(static, constant) DEFAULT_START_TIMEOUT_MS :number

The default amount of time, in milliseconds, to wait for the server to start.

Type:
  • number

Methods

address() → (non-null) {Promise.<string>}

Throws:

If the server has not been started.

Type
Error
Returns:

A promise that resolves to the server's address.

Type: 
Promise.<string>

isRunning() → {boolean}

Returns whether the underlying process is still running. This does not take into account whether the process is in the process of shutting down.

Returns:

Whether the underlying service process is running.

Type: 
boolean

kill() → (non-null) {Promise}

Stops the service if it is not currently running. This function will kill the server immediately. To synchronize with the active control flow, use #stop().

Returns:

A promise that will be resolved when the server has been stopped.

Type: 
Promise

start(opt_timeoutMsopt) → (non-null) {Promise.<string>}

Starts the server if it is not already running.

Parameters:
NameTypeAttributesDescription
opt_timeoutMsnumber<optional>

How long to wait, in milliseconds, for the server to start accepting requests. Defaults to 30 seconds.

Returns:

A promise that will resolve to the server's base URL when it has started accepting requests. If the timeout expires before the server has started, the promise will be rejected.

Type: 
Promise.<string>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ElementClickInterceptedError.html b/docs/api/javascript/ElementClickInterceptedError.html index a83e71b40bfdc..c4d0653ab1115 100644 --- a/docs/api/javascript/ElementClickInterceptedError.html +++ b/docs/api/javascript/ElementClickInterceptedError.html @@ -1,3 +1,3 @@ Class: ElementClickInterceptedError
On this page

ElementClickInterceptedError

Indicates a click command could not completed because the click target is obscured by other elements on the page.

Constructor

new ElementClickInterceptedError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ElementClickInterceptedError

Indicates a click command could not completed because the click target is obscured by other elements on the page.

Constructor

new ElementClickInterceptedError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ElementClipRectangle.html b/docs/api/javascript/ElementClipRectangle.html index a8ed519e6f449..ad1df6f5f63fb 100644 --- a/docs/api/javascript/ElementClipRectangle.html +++ b/docs/api/javascript/ElementClipRectangle.html @@ -1,3 +1,3 @@ Class: ElementClipRectangle
On this page

ElementClipRectangle

Represents a clip rectangle for an element.

Constructor

new ElementClipRectangle(sharedId, handleIdopt)

Constructs a new ElementClipRectangle instance.

Parameters:
NameTypeAttributesDescription
sharedIdstring

The shared ID of the element.

handleIdstring<optional>

The handle ID of the element (optional).

Extends

Members

type

Gets the type of the clip rectangle.

Methods

asMap() → {Map}

Converts the ElementClipRectangle instance to a map.

Returns:
  • The converted map.
Type: 
Map
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ElementClipRectangle

Represents a clip rectangle for an element.

Constructor

new ElementClipRectangle(sharedId, handleIdopt)

Constructs a new ElementClipRectangle instance.

Parameters:
NameTypeAttributesDescription
sharedIdstring

The shared ID of the element.

handleIdstring<optional>

The handle ID of the element (optional).

Extends

Members

type

Gets the type of the clip rectangle.

Methods

asMap() → {Map}

Converts the ElementClipRectangle instance to a map.

Returns:
  • The converted map.
Type: 
Map
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ElementNotInteractableError.html b/docs/api/javascript/ElementNotInteractableError.html index 6de3e33c77548..9f3a536ab907e 100644 --- a/docs/api/javascript/ElementNotInteractableError.html +++ b/docs/api/javascript/ElementNotInteractableError.html @@ -1,3 +1,3 @@ Class: ElementNotInteractableError
On this page

ElementNotInteractableError

Indicates a command could not be completed because the target element is not pointer or keyboard interactable. This will often occur if an element is present in the DOM, but not rendered (i.e. its CSS style has "display: none").

Constructor

new ElementNotInteractableError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ElementNotInteractableError

Indicates a command could not be completed because the target element is not pointer or keyboard interactable. This will often occur if an element is present in the DOM, but not rendered (i.e. its CSS style has "display: none").

Constructor

new ElementNotInteractableError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ElementNotSelectableError.html b/docs/api/javascript/ElementNotSelectableError.html index c802001cc7cbe..06887728d6df8 100644 --- a/docs/api/javascript/ElementNotSelectableError.html +++ b/docs/api/javascript/ElementNotSelectableError.html @@ -1,3 +1,3 @@ Class: ElementNotSelectableError
On this page

ElementNotSelectableError

An attempt was made to select an element that cannot be selected.

Constructor

new ElementNotSelectableError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ElementNotSelectableError

An attempt was made to select an element that cannot be selected.

Constructor

new ElementNotSelectableError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Entry.html b/docs/api/javascript/Entry.html index e86b5ce4b93ac..b5918ff9ca32a 100644 --- a/docs/api/javascript/Entry.html +++ b/docs/api/javascript/Entry.html @@ -1,3 +1,3 @@ Class: Entry
On this page

Entry

Describes a single log entry.

Constructor

new Entry(level, message, opt_timestampopt, opt_typeopt)

Parameters:
NameTypeAttributesDescription
levelLevel | string | number

The entry level.

messagestring

The log message.

opt_timestampnumber<optional>

The time this entry was generated, in milliseconds since 0:00:00, January 1, 1970 UTC. If omitted, the current time will be used.

opt_typestring<optional>

The log type, if known.

Methods

toJSON() → {Object}

Returns:

The JSON representation of this entry.

Type: 
Object
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Entry

Describes a single log entry.

Constructor

new Entry(level, message, opt_timestampopt, opt_typeopt)

Parameters:
NameTypeAttributesDescription
levelLevel | string | number

The entry level.

messagestring

The log message.

opt_timestampnumber<optional>

The time this entry was generated, in milliseconds since 0:00:00, January 1, 1970 UTC. If omitted, the current time will be used.

opt_typestring<optional>

The log type, if known.

Methods

toJSON() → {Object}

Returns:

The JSON representation of this entry.

Type: 
Object
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Environment.html b/docs/api/javascript/Environment.html index c76c2f3bc98f0..59123ee51b51d 100644 --- a/docs/api/javascript/Environment.html +++ b/docs/api/javascript/Environment.html @@ -1,3 +1,3 @@ Class: Environment
On this page

Environment

Defines the environment a test suite is running against.

Constructor

new Environment(browsernon-null, urlopt, nullable)

Parameters:
NameTypeAttributesDescription
browserTargetBrowser

the browser targetted in this environment.

urlstring | remote.SeleniumServer<optional>
<nullable>

remote URL of an existing Selenium server to test against.

Members

browser

Methods

browsers(…browsersToIgnore) → {function}

Returns a predicate function that will suppress tests in this environment if the current browser is in the list of browsersToIgnore.

Parameters:
NameTypeAttributesDescription
browsersToIgnorestring | Browser<repeatable>

the browsers that should be ignored.

Returns:

a new predicate function.

Type: 
function

builder() → (non-null) {Builder}

Returns:

a new WebDriver builder configured to target this environment's browser.

Type: 
Builder
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Environment

Defines the environment a test suite is running against.

Constructor

new Environment(browsernon-null, urlopt, nullable)

Parameters:
NameTypeAttributesDescription
browserTargetBrowser

the browser targetted in this environment.

urlstring | remote.SeleniumServer<optional>
<nullable>

remote URL of an existing Selenium server to test against.

Members

browser

Methods

browsers(…browsersToIgnore) → {function}

Returns a predicate function that will suppress tests in this environment if the current browser is in the list of browsersToIgnore.

Parameters:
NameTypeAttributesDescription
browsersToIgnorestring | Browser<repeatable>

the browsers that should be ignored.

Returns:

a new predicate function.

Type: 
function

builder() → (non-null) {Builder}

Returns:

a new WebDriver builder configured to target this environment's browser.

Type: 
Builder
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/EvaluateResultException.html b/docs/api/javascript/EvaluateResultException.html index 23f86a62244c7..0cd2d4db86a8a 100644 --- a/docs/api/javascript/EvaluateResultException.html +++ b/docs/api/javascript/EvaluateResultException.html @@ -1,3 +1,3 @@ Class: EvaluateResultException
On this page

EvaluateResultException

Represents an exception that occurred during evaluation of a result.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

EvaluateResultException

Represents an exception that occurred during evaluation of a result.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/EvaluateResultSuccess.html b/docs/api/javascript/EvaluateResultSuccess.html index 480acf758efae..bc0828294e973 100644 --- a/docs/api/javascript/EvaluateResultSuccess.html +++ b/docs/api/javascript/EvaluateResultSuccess.html @@ -1,3 +1,3 @@ Class: EvaluateResultSuccess
On this page

EvaluateResultSuccess

Represents a successful evaluation result.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

EvaluateResultSuccess

Represents a successful evaluation result.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ExceptionDetails.html b/docs/api/javascript/ExceptionDetails.html index ee57513eb1713..9c1ae53d17f45 100644 --- a/docs/api/javascript/ExceptionDetails.html +++ b/docs/api/javascript/ExceptionDetails.html @@ -1,3 +1,3 @@ Class: ExceptionDetails
On this page

ExceptionDetails

Represents details of an exception.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ExceptionDetails

Represents details of an exception.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Executor.html b/docs/api/javascript/Executor.html index 742225aa98871..48e42a64627f2 100644 --- a/docs/api/javascript/Executor.html +++ b/docs/api/javascript/Executor.html @@ -1,3 +1,3 @@ Interface: Executor
On this page

Executor

Handles the execution of WebDriver commands.

Methods

defineCommand(name, method, path)

Defines a new command for use with this executor. When a command is sent, the {@code path} will be preprocessed using the command's parameters; any path segments prefixed with ":" will be replaced by the parameter of the same name. For example, given "/person/:name" and the parameters "{name: 'Bob'}", the final command path will be "/person/Bob".

Parameters:
NameTypeDescription
namestring

The command name.

methodstring

The HTTP method to use when sending this command.

pathstring

The path to send the command to, relative to the WebDriver server's command root and of the form "/path/:variable/segment".

execute(commandnon-null) → (non-null) {Promise.<?>}

Executes the given {@code command}. If there is an error executing the command, the provided callback will be invoked with the offending error. Otherwise, the callback will be invoked with a null Error and non-null response object.

Parameters:
NameTypeDescription
commandCommand

The command to execute.

Returns:

A promise that will be fulfilled with the command result.

Type: 
Promise.<?>

(async) execute()

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Executor

Handles the execution of WebDriver commands.

Methods

defineCommand(name, method, path)

Defines a new command for use with this executor. When a command is sent, the {@code path} will be preprocessed using the command's parameters; any path segments prefixed with ":" will be replaced by the parameter of the same name. For example, given "/person/:name" and the parameters "{name: 'Bob'}", the final command path will be "/person/Bob".

Parameters:
NameTypeDescription
namestring

The command name.

methodstring

The HTTP method to use when sending this command.

pathstring

The path to send the command to, relative to the WebDriver server's command root and of the form "/path/:variable/segment".

execute(commandnon-null) → (non-null) {Promise.<?>}

Executes the given {@code command}. If there is an error executing the command, the provided callback will be invoked with the offending error. Otherwise, the callback will be invoked with a null Error and non-null response object.

Parameters:
NameTypeDescription
commandCommand

The command to execute.

Returns:

A promise that will be fulfilled with the command result.

Type: 
Promise.<?>

(async) execute()

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/FetchError.html b/docs/api/javascript/FetchError.html index 4101122d57cff..ce6e0b7d4f375 100644 --- a/docs/api/javascript/FetchError.html +++ b/docs/api/javascript/FetchError.html @@ -1,3 +1,3 @@ Class: FetchError
On this page

FetchError

Represents the FetchError event parameters. Described https://w3c.github.io/webdriver-bidi/#event-network-fetchError

Constructor

new FetchError(id, navigation, redirectCount, request, timestamp, errorText)

Creates a new FetchError instance.

Parameters:
NameTypeDescription
idstring

The ID of the error.

navigationstring

The navigation information.

redirectCountnumber

The number of redirects.

requestRequestData

The request object.

timestampnumber

The timestamp of the error.

errorTextstring

The error text.

Extends

Members

errorText

Gets the error text.

id

Gets the browsing context ID of the network request.

Gets the navigation information associated with the network request.

redirectCount

Gets the number of redirects that occurred during the network request.

request

Gets the request data for the network request.

timestamp

Gets the timestamp of the network request.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

FetchError

Represents the FetchError event parameters. Described https://w3c.github.io/webdriver-bidi/#event-network-fetchError

Constructor

new FetchError(id, navigation, redirectCount, request, timestamp, errorText)

Creates a new FetchError instance.

Parameters:
NameTypeDescription
idstring

The ID of the error.

navigationstring

The navigation information.

redirectCountnumber

The number of redirects.

requestRequestData

The request object.

timestampnumber

The timestamp of the error.

errorTextstring

The error text.

Extends

Members

errorText

Gets the error text.

id

Gets the browsing context ID of the network request.

Gets the navigation information associated with the network request.

redirectCount

Gets the number of redirects that occurred during the network request.

request

Gets the request data for the network request.

timestamp

Gets the timestamp of the network request.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/FetchTimingInfo.html b/docs/api/javascript/FetchTimingInfo.html index ce44cb1c764a0..f11908ed545bf 100644 --- a/docs/api/javascript/FetchTimingInfo.html +++ b/docs/api/javascript/FetchTimingInfo.html @@ -1,3 +1,3 @@ Class: FetchTimingInfo
On this page

FetchTimingInfo

Represents the time of each part of the request. Described in https://w3c.github.io/webdriver-bidi/#type-network-FetchTimingInfo.

Constructor

new FetchTimingInfo()

Members

connectEnd

Gets the timestamp when the connection ended.

connectStart

Gets the timestamp when the connection started.

dnsEnd

Gets the timestamp when the domain lookup ended.

dnsStart

Gets the timestamp when the domain lookup started.

fetchStart

Gets the timestamp when the fetch started.

originTime

Gets the origin time.

redirectEnd

Gets the timestamp when the redirect ended.

redirectStart

Gets the timestamp when the redirect started.

requestStart

Gets the timestamp when the request started.

requestTime

Get the request time.

responseEnd

Gets the timestamp when the response ended.

responseStart

Gets the timestamp when the response started.

tlsStart

Gets the timestamp when the secure connection started.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

FetchTimingInfo

Represents the time of each part of the request. Described in https://w3c.github.io/webdriver-bidi/#type-network-FetchTimingInfo.

Constructor

new FetchTimingInfo()

Members

connectEnd

Gets the timestamp when the connection ended.

connectStart

Gets the timestamp when the connection started.

dnsEnd

Gets the timestamp when the domain lookup ended.

dnsStart

Gets the timestamp when the domain lookup started.

fetchStart

Gets the timestamp when the fetch started.

originTime

Gets the origin time.

redirectEnd

Gets the timestamp when the redirect ended.

redirectStart

Gets the timestamp when the redirect started.

requestStart

Gets the timestamp when the request started.

requestTime

Get the request time.

responseEnd

Gets the timestamp when the response ended.

responseStart

Gets the timestamp when the response started.

tlsStart

Gets the timestamp when the secure connection started.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/FileDetector.html b/docs/api/javascript/FileDetector.html index 73d7b2e2584db..94a12f56456db 100644 --- a/docs/api/javascript/FileDetector.html +++ b/docs/api/javascript/FileDetector.html @@ -1,3 +1,3 @@ Class: FileDetector
On this page

FileDetector

Used with WebElement#sendKeys on file input elements (<input type="file">) to detect when the entered key sequence defines the path to a file.

By default, WebElement's will enter all key sequences exactly as entered. You may set a file detector on the parent WebDriver instance to define custom behavior for handling file elements. Of particular note is the selenium-webdriver/remote.FileDetector, which should be used when running against a remote Selenium Server.

Constructor

new FileDetector()

Methods

(package) handleFile(_driver, path) → (non-null) {Promise.<string>}

Handles the file specified by the given path, preparing it for use with the current browser. If the path does not refer to a valid file, it will be returned unchanged, otherwise a path suitable for use with the current browser will be returned.

This default implementation is a no-op. Subtypes may override this function for custom tailored file handling.

Parameters:
NameTypeDescription
_driver
pathstring

The path to process.

Returns:

A promise for the processed file path.

Type: 
Promise.<string>

handleFile()

Prepares a file for use with the remote browser. If the provided path does not reference a normal file (i.e. it does not exist or is a directory), then the promise returned by this method will be resolved with the original file path. Otherwise, this method will upload the file to the remote server, which will return the file's path on the remote system so it may be referenced in subsequent commands.

FileDetector

A webdriver.FileDetector that may be used when running against a remote Selenium server.

When a file path on the local machine running this script is entered with WebElement#sendKeys, this file detector will transfer the specified file to the Selenium server's host; the sendKeys command will be updated to use the transferred file's path.

Note: This class depends on a non-standard command supported on the Java Selenium server. The file detector will fail if used with a server that only supports standard WebDriver commands (such as the ChromeDriver).

Constructor

new FileDetector()

Methods

(package) handleFile(_driver, path) → (non-null) {Promise.<string>}

Handles the file specified by the given path, preparing it for use with the current browser. If the path does not refer to a valid file, it will be returned unchanged, otherwise a path suitable for use with the current browser will be returned.

This default implementation is a no-op. Subtypes may override this function for custom tailored file handling.

Parameters:
NameTypeDescription
_driver
pathstring

The path to process.

Returns:

A promise for the processed file path.

Type: 
Promise.<string>

handleFile()

Prepares a file for use with the remote browser. If the provided path does not reference a normal file (i.e. it does not exist or is a directory), then the promise returned by this method will be resolved with the original file path. Otherwise, this method will upload the file to the remote server, which will return the file's path on the remote system so it may be referenced in subsequent commands.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

FileDetector

Used with WebElement#sendKeys on file input elements (<input type="file">) to detect when the entered key sequence defines the path to a file.

By default, WebElement's will enter all key sequences exactly as entered. You may set a file detector on the parent WebDriver instance to define custom behavior for handling file elements. Of particular note is the selenium-webdriver/remote.FileDetector, which should be used when running against a remote Selenium Server.

Constructor

new FileDetector()

Methods

(package) handleFile(_driver, path) → (non-null) {Promise.<string>}

Handles the file specified by the given path, preparing it for use with the current browser. If the path does not refer to a valid file, it will be returned unchanged, otherwise a path suitable for use with the current browser will be returned.

This default implementation is a no-op. Subtypes may override this function for custom tailored file handling.

Parameters:
NameTypeDescription
_driver
pathstring

The path to process.

Returns:

A promise for the processed file path.

Type: 
Promise.<string>

handleFile()

Prepares a file for use with the remote browser. If the provided path does not reference a normal file (i.e. it does not exist or is a directory), then the promise returned by this method will be resolved with the original file path. Otherwise, this method will upload the file to the remote server, which will return the file's path on the remote system so it may be referenced in subsequent commands.

FileDetector

A webdriver.FileDetector that may be used when running against a remote Selenium server.

When a file path on the local machine running this script is entered with WebElement#sendKeys, this file detector will transfer the specified file to the Selenium server's host; the sendKeys command will be updated to use the transferred file's path.

Note: This class depends on a non-standard command supported on the Java Selenium server. The file detector will fail if used with a server that only supports standard WebDriver commands (such as the ChromeDriver).

Constructor

new FileDetector()

Methods

(package) handleFile(_driver, path) → (non-null) {Promise.<string>}

Handles the file specified by the given path, preparing it for use with the current browser. If the path does not refer to a valid file, it will be returned unchanged, otherwise a path suitable for use with the current browser will be returned.

This default implementation is a no-op. Subtypes may override this function for custom tailored file handling.

Parameters:
NameTypeDescription
_driver
pathstring

The path to process.

Returns:

A promise for the processed file path.

Type: 
Promise.<string>

handleFile()

Prepares a file for use with the remote browser. If the provided path does not reference a normal file (i.e. it does not exist or is a directory), then the promise returned by this method will be resolved with the original file path. Otherwise, this method will upload the file to the remote server, which will return the file's path on the remote system so it may be referenced in subsequent commands.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/GenericLogEntry.html b/docs/api/javascript/GenericLogEntry.html index 4266d9f02e9e2..5e51c2560c1e3 100644 --- a/docs/api/javascript/GenericLogEntry.html +++ b/docs/api/javascript/GenericLogEntry.html @@ -1,3 +1,3 @@ Class: GenericLogEntry
On this page

GenericLogEntry

Represents a generic log entry.

Constructor

new GenericLogEntry(level, source, text, timeStamp, type, stackTrace)

Creates an instance of GenericLogEntry.

Parameters:
NameTypeDescription
levelstring

The log level.

sourcesource

Script Source

textstring

The log text.

timeStampDate

The log timestamp.

typestring

The log type.

stackTracestring

The log stack trace.

Extends

Members

level

Gets the log level.

stackTrace

Gets the log stack trace.

text

Gets the log text.

timeStamp

Gets the log timestamp.

type

Gets the log type.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

GenericLogEntry

Represents a generic log entry.

Constructor

new GenericLogEntry(level, source, text, timeStamp, type, stackTrace)

Creates an instance of GenericLogEntry.

Parameters:
NameTypeDescription
levelstring

The log level.

sourcesource

Script Source

textstring

The log text.

timeStampDate

The log timestamp.

typestring

The log type.

stackTracestring

The log stack trace.

Extends

Members

level

Gets the log level.

stackTrace

Gets the log stack trace.

text

Gets the log text.

timeStamp

Gets the log timestamp.

type

Gets the log type.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Header.html b/docs/api/javascript/Header.html index 5f6eb4bb47042..c713a01b5d91d 100644 --- a/docs/api/javascript/Header.html +++ b/docs/api/javascript/Header.html @@ -1,3 +1,3 @@ Class: Header
On this page

Header

Represents a header with a name and value. Described in https://w3c.github.io/webdriver-bidi/#type-network-Header.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Header

Represents a header with a name and value. Described in https://w3c.github.io/webdriver-bidi/#type-network-Header.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/HttpClient.html b/docs/api/javascript/HttpClient.html index d02e5ef1804d3..403397757a921 100644 --- a/docs/api/javascript/HttpClient.html +++ b/docs/api/javascript/HttpClient.html @@ -1,3 +1,3 @@ Class: HttpClient
On this page

HttpClient

A basic HTTP client used to send messages to a remote end.

Constructor

new HttpClient(serverUrl, opt_agentopt, opt_proxyopt, nullable, client_optionsnullable)

Parameters:
NameTypeAttributesDescription
serverUrlstring

URL for the WebDriver server to send commands to.

opt_agenthttp.Agent<optional>

The agent to use for each request. Defaults to http.globalAgent.

opt_proxystring<optional>
<nullable>

The proxy to use for the connection to the server. Default is to use no proxy.

client_optionsObject.<string, Object><nullable>
Implements
  • httpLib.Client

Members

client_options

client options, header overrides

keepAlive

sets keep-alive for the agent see https://stackoverflow.com/a/58332910

Methods

send()

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

HttpClient

A basic HTTP client used to send messages to a remote end.

Constructor

new HttpClient(serverUrl, opt_agentopt, opt_proxyopt, nullable, client_optionsnullable)

Parameters:
NameTypeAttributesDescription
serverUrlstring

URL for the WebDriver server to send commands to.

opt_agenthttp.Agent<optional>

The agent to use for each request. Defaults to http.globalAgent.

opt_proxystring<optional>
<nullable>

The proxy to use for the connection to the server. Default is to use no proxy.

client_optionsObject.<string, Object><nullable>
Implements
  • httpLib.Client

Members

client_options

client options, header overrides

keepAlive

sets keep-alive for the agent see https://stackoverflow.com/a/58332910

Methods

send()

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/HttpResponse.html b/docs/api/javascript/HttpResponse.html index 3bc752d44dbaa..c2a94d85d4171 100644 --- a/docs/api/javascript/HttpResponse.html +++ b/docs/api/javascript/HttpResponse.html @@ -1,3 +1,3 @@ Class: HttpResponse
On this page

HttpResponse

new HttpResponse(urlToIntercept)

Creates a HTTP Response that will be used to mock out network interceptions.

Parameters:
NameTypeDescription
urlToIntercept*

Members

body

Sets the value of the body of the HTTP Request that will be returned.

method

Sets the method of the HTTP Request

method

Returns the Method to be used in the intercept

status

Set the STATUS value of the returned HTTP Request

Methods

addHeaders(header, value)

Add headers that will be returned when we intercept a HTTP Request

Parameters:
NameTypeDescription
header*
value*
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

HttpResponse

new HttpResponse(urlToIntercept)

Creates a HTTP Response that will be used to mock out network interceptions.

Parameters:
NameTypeDescription
urlToIntercept*

Members

body

Sets the value of the body of the HTTP Request that will be returned.

method

Sets the method of the HTTP Request

method

Returns the Method to be used in the intercept

status

Set the STATUS value of the returned HTTP Request

Methods

addHeaders(header, value)

Add headers that will be returned when we intercept a HTTP Request

Parameters:
NameTypeDescription
header*
value*
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ISelect.html b/docs/api/javascript/ISelect.html index e6e9d1f2672d3..ac4337a253ae7 100644 --- a/docs/api/javascript/ISelect.html +++ b/docs/api/javascript/ISelect.html @@ -1,3 +1,3 @@ Interface: ISelect
On this page

ISelect

ISelect interface makes a protocol for all kind of select elements (standard html and custom model)

Methods

deselectAll() → {Promise.<void>}

Clear all selected entries. This is only valid when the SELECT supports multiple selections.

Returns:
Type: 
Promise.<void>

deselectByIndex(index) → {Promise.<void>}

Deselect the option at the given index. This is done by examining the "index" attribute of an element, and not merely by counting.

Parameters:
NameTypeDescription
indexNumber

The option at this index will be deselected

Returns:
Type: 
Promise.<void>

deselectByValue(value) → {Promise.<void>}

Deselect all options that have a value matching the argument. That is, when given "foo" this would deselect an option like:

Parameters:
NameTypeDescription
valuestring

The value to match against

Returns:
Type: 
Promise.<void>

deselectByVisibleText(text) → {Promise.<void>}

Deselect all options that display text matching the argument. That is, when given "Bar" this would deselect an option like:

<option value="foo">Bar</option>

Parameters:
NameTypeDescription
textstring

The visible text to match against

Returns:
Type: 
Promise.<void>

getAllSelectedOptions() → (non-null) {Promise.<!Array.<!WebElement>>}

Returns:

All selected options belonging to this select tag

Type: 
Promise.<!Array.<!WebElement>>

getFirstSelectedOption() → (non-null) {Promise.<!WebElement>}

Returns:

The first selected option in this select tag (or the currently selected option in a normal select)

Type: 
Promise.<!WebElement>

getOptions() → (non-null) {Promise.<!Array.<!WebElement>>}

Returns:

All options belonging to this select tag

Type: 
Promise.<!Array.<!WebElement>>

isMultiple() → (non-null) {Promise.<boolean>}

Returns:

Whether this select element supports selecting multiple options at the same time? This is done by checking the value of the "multiple" attribute.

Type: 
Promise.<boolean>

selectByIndex(index) → {Promise.<void>}

Select the option at the given index. This is done by examining the "index" attribute of an element, and not merely by counting.

Parameters:
NameTypeDescription
indexNumber

The option at this index will be selected

Returns:
Type: 
Promise.<void>

selectByValue(value) → {Promise.<void>}

Select all options that have a value matching the argument. That is, when given "foo" this would select an option like:

<option value="foo">Bar</option>

Parameters:
NameTypeDescription
valuestring

The value to match against

Returns:
Type: 
Promise.<void>

selectByVisibleText(text) → {Promise.<void>}

Select all options that display text matching the argument. That is, when given "Bar" this would select an option like:

<option value="foo">Bar</option>

Parameters:
NameTypeDescription
textstring

The visible text to match against

Returns:
Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ISelect

ISelect interface makes a protocol for all kind of select elements (standard html and custom model)

Methods

deselectAll() → {Promise.<void>}

Clear all selected entries. This is only valid when the SELECT supports multiple selections.

Returns:
Type: 
Promise.<void>

deselectByIndex(index) → {Promise.<void>}

Deselect the option at the given index. This is done by examining the "index" attribute of an element, and not merely by counting.

Parameters:
NameTypeDescription
indexNumber

The option at this index will be deselected

Returns:
Type: 
Promise.<void>

deselectByValue(value) → {Promise.<void>}

Deselect all options that have a value matching the argument. That is, when given "foo" this would deselect an option like:

Parameters:
NameTypeDescription
valuestring

The value to match against

Returns:
Type: 
Promise.<void>

deselectByVisibleText(text) → {Promise.<void>}

Deselect all options that display text matching the argument. That is, when given "Bar" this would deselect an option like:

<option value="foo">Bar</option>

Parameters:
NameTypeDescription
textstring

The visible text to match against

Returns:
Type: 
Promise.<void>

getAllSelectedOptions() → (non-null) {Promise.<!Array.<!WebElement>>}

Returns:

All selected options belonging to this select tag

Type: 
Promise.<!Array.<!WebElement>>

getFirstSelectedOption() → (non-null) {Promise.<!WebElement>}

Returns:

The first selected option in this select tag (or the currently selected option in a normal select)

Type: 
Promise.<!WebElement>

getOptions() → (non-null) {Promise.<!Array.<!WebElement>>}

Returns:

All options belonging to this select tag

Type: 
Promise.<!Array.<!WebElement>>

isMultiple() → (non-null) {Promise.<boolean>}

Returns:

Whether this select element supports selecting multiple options at the same time? This is done by checking the value of the "multiple" attribute.

Type: 
Promise.<boolean>

selectByIndex(index) → {Promise.<void>}

Select the option at the given index. This is done by examining the "index" attribute of an element, and not merely by counting.

Parameters:
NameTypeDescription
indexNumber

The option at this index will be selected

Returns:
Type: 
Promise.<void>

selectByValue(value) → {Promise.<void>}

Select all options that have a value matching the argument. That is, when given "foo" this would select an option like:

<option value="foo">Bar</option>

Parameters:
NameTypeDescription
valuestring

The value to match against

Returns:
Type: 
Promise.<void>

selectByVisibleText(text) → {Promise.<void>}

Select all options that display text matching the argument. That is, when given "Bar" this would select an option like:

<option value="foo">Bar</option>

Parameters:
NameTypeDescription
textstring

The visible text to match against

Returns:
Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/IWebDriver.html b/docs/api/javascript/IWebDriver.html index 9f05fe0855887..a36f37965ce03 100644 --- a/docs/api/javascript/IWebDriver.html +++ b/docs/api/javascript/IWebDriver.html @@ -1,6 +1,6 @@ Interface: IWebDriver
On this page

IWebDriver

Structural interface for a WebDriver client.

Methods

actions(optionsopt) → (non-null) {input.Actions}

Creates a new action sequence using this driver. The sequence will not be submitted for execution until Actions.perform() is called.

Parameters:
NameTypeAttributesDescription
optionsObject<optional>

Configuration options for the action sequence (see Actions documentation for details).

Returns:

A new action sequence for this instance.

Type: 
input.Actions

close() → (non-null) {Promise.<void>}

Closes the current window.

Returns:

A promise that will be resolved when this command has completed.

Type: 
Promise.<void>

execute(commandnon-null) → (non-null) {Promise.<T>}

Executes the provided command.Command using this driver's command.Executor.

Parameters:
NameTypeDescription
commandcommand.Command

The command to schedule.

Returns:

A promise that will be resolved with the command result.

Type: 
Promise.<T>

executeAsyncScript(scriptnon-null, …args) → (non-null) {IThenable.<T>}

Executes a snippet of asynchronous JavaScript in the context of the currently selected frame or window. The script fragment will be executed as the body of an anonymous function. If the script is provided as a function object, that function will be converted to a string for injection into the target window.

Any arguments provided in addition to the script will be included as script arguments and may be referenced using the arguments object. Arguments may be a boolean, number, string, or WebElement. Arrays and objects may also be used as script arguments as long as each item adheres to the types previously mentioned.

Unlike executing synchronous JavaScript with #executeScript, scripts executed with this function must explicitly signal they are finished by invoking the provided callback. This callback will always be injected into the executed function as the last argument, and thus may be referenced with arguments[arguments.length - 1]. The following steps will be taken for resolving this functions return value against the first argument to the script's callback function:

  • For a HTML element, the value will resolve to a WebElement
  • Null and undefined return values will resolve to null
  • Booleans, numbers, and strings will resolve as is
  • Functions will resolve to their string representation
  • For arrays and objects, each member item will be converted according to the rules above

Example #1: Performing a sleep that is synchronized with the currently selected window:

var start = new Date().getTime();
+    
On this page

IWebDriver

Structural interface for a WebDriver client.

Methods

actions(optionsopt) → (non-null) {input.Actions}

Creates a new action sequence using this driver. The sequence will not be submitted for execution until Actions.perform() is called.

Parameters:
NameTypeAttributesDescription
optionsObject<optional>

Configuration options for the action sequence (see Actions documentation for details).

Returns:

A new action sequence for this instance.

Type: 
input.Actions

close() → (non-null) {Promise.<void>}

Closes the current window.

Returns:

A promise that will be resolved when this command has completed.

Type: 
Promise.<void>

execute(commandnon-null) → (non-null) {Promise.<T>}

Executes the provided command.Command using this driver's command.Executor.

Parameters:
NameTypeDescription
commandcommand.Command

The command to schedule.

Returns:

A promise that will be resolved with the command result.

Type: 
Promise.<T>

executeAsyncScript(scriptnon-null, …args) → (non-null) {IThenable.<T>}

Executes a snippet of asynchronous JavaScript in the context of the currently selected frame or window. The script fragment will be executed as the body of an anonymous function. If the script is provided as a function object, that function will be converted to a string for injection into the target window.

Any arguments provided in addition to the script will be included as script arguments and may be referenced using the arguments object. Arguments may be a boolean, number, string, or WebElement. Arrays and objects may also be used as script arguments as long as each item adheres to the types previously mentioned.

Unlike executing synchronous JavaScript with #executeScript, scripts executed with this function must explicitly signal they are finished by invoking the provided callback. This callback will always be injected into the executed function as the last argument, and thus may be referenced with arguments[arguments.length - 1]. The following steps will be taken for resolving this functions return value against the first argument to the script's callback function:

  • For a HTML element, the value will resolve to a WebElement
  • Null and undefined return values will resolve to null
  • Booleans, numbers, and strings will resolve as is
  • Functions will resolve to their string representation
  • For arrays and objects, each member item will be converted according to the rules above

Example #1: Performing a sleep that is synchronized with the currently selected window:

var start = new Date().getTime();
 driver.executeAsyncScript(
     'window.setTimeout(arguments[arguments.length - 1], 500);').
     then(function() {
@@ -44,4 +44,4 @@
       await driver.wait(until.elementLocated(By.id('foo')), 10000);
   await button.click();
 }
-
Parameters:
NameTypeAttributesDescription
conditionIThenable.<T> | Condition.<T> | function

The condition to wait on, defined as a promise, condition object, or a function to evaluate as a condition.

timeoutnumber<optional>

The duration in milliseconds, how long to wait for the condition to be true.

messagestring | function<optional>

An optional message to use if the wait times out.

pollTimeoutnumber<optional>

The duration in milliseconds, how long to wait between polling the condition.

Throws:

if the provided condition is not a valid type.

Type
TypeError
Returns:

A promise that will be resolved with the first truthy value returned by the condition function, or rejected if the condition times out. If the input condition is an instance of a WebElementCondition, the returned value will be a WebElementPromise.

Type: 
IThenable.<T> | WebElementPromise
Selenium WebDriver JavaScript API
\ No newline at end of file +
Parameters:
NameTypeAttributesDescription
conditionIThenable.<T> | Condition.<T> | function

The condition to wait on, defined as a promise, condition object, or a function to evaluate as a condition.

timeoutnumber<optional>

The duration in milliseconds, how long to wait for the condition to be true.

messagestring | function<optional>

An optional message to use if the wait times out.

pollTimeoutnumber<optional>

The duration in milliseconds, how long to wait between polling the condition.

Throws:

if the provided condition is not a valid type.

Type
TypeError
Returns:

A promise that will be resolved with the first truthy value returned by the condition function, or rejected if the condition times out. If the input condition is an instance of a WebElementCondition, the returned value will be a WebElementPromise.

Type: 
IThenable.<T> | WebElementPromise
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Index_.html b/docs/api/javascript/Index_.html index e94222569cd58..83c8066e19563 100644 --- a/docs/api/javascript/Index_.html +++ b/docs/api/javascript/Index_.html @@ -1,3 +1,3 @@ Class: Index
On this page

Index

new Index(_webSocketUrl)

Create a new websocket connection

Parameters:
NameTypeDescription
_webSocketUrl

Members

isConnected

socket

status

Get Bidi Status

Methods

close() → {Promise.<unknown>}

Close ws connection.

Returns:
Type: 
Promise.<unknown>

(async) send(params) → {Promise.<unknown>}

Sends a bidi request

Parameters:
NameTypeDescription
params
Returns:
Type: 
Promise.<unknown>

(async) subscribe(events, browsingContexts) → {Promise.<void>}

Subscribe to events

Parameters:
NameTypeDescription
events
browsingContexts
Returns:
Type: 
Promise.<void>

(async) unsubscribe(events, browsingContexts) → {Promise.<void>}

Unsubscribe to events

Parameters:
NameTypeDescription
events
browsingContexts
Returns:
Type: 
Promise.<void>

(async) waitForConnection() → {Promise.<unknown>}

Resolve connection

Returns:
Type: 
Promise.<unknown>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Index

new Index(_webSocketUrl)

Create a new websocket connection

Parameters:
NameTypeDescription
_webSocketUrl

Members

isConnected

socket

status

Get Bidi Status

Methods

close() → {Promise.<unknown>}

Close ws connection.

Returns:
Type: 
Promise.<unknown>

(async) send(params) → {Promise.<unknown>}

Sends a bidi request

Parameters:
NameTypeDescription
params
Returns:
Type: 
Promise.<unknown>

(async) subscribe(events, browsingContexts) → {Promise.<void>}

Subscribe to events

Parameters:
NameTypeDescription
events
browsingContexts
Returns:
Type: 
Promise.<void>

(async) unsubscribe(events, browsingContexts) → {Promise.<void>}

Unsubscribe to events

Parameters:
NameTypeDescription
events
browsingContexts
Returns:
Type: 
Promise.<void>

(async) waitForConnection() → {Promise.<unknown>}

Resolve connection

Returns:
Type: 
Promise.<unknown>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Initiator.html b/docs/api/javascript/Initiator.html index 92f834587bde9..4bcf8b7d23dbd 100644 --- a/docs/api/javascript/Initiator.html +++ b/docs/api/javascript/Initiator.html @@ -1,3 +1,3 @@ Class: Initiator
On this page

Initiator

Represents source in the network. Described in https://w3c.github.io/webdriver-bidi/#type-network-Initiator.

Constructor

new Initiator(type, columnNumber, lineNumber, stackTrace, request)

Constructs a new Initiator instance.

Parameters:
NameTypeDescription
typestring

The type of the initiator.

columnNumbernumber

The column number.

lineNumbernumber

The line number.

stackTracestring

The stack trace.

requeststring

The request id.

Members

columnNumber

Gets the column number.

lineNumber

Gets the line number.

request

Gets the request ID.

stackTrace

Gets the stack trace.

type

Gets the type of the initiator.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Initiator

Represents source in the network. Described in https://w3c.github.io/webdriver-bidi/#type-network-Initiator.

Constructor

new Initiator(type, columnNumber, lineNumber, stackTrace, request)

Constructs a new Initiator instance.

Parameters:
NameTypeDescription
typestring

The type of the initiator.

columnNumbernumber

The column number.

lineNumbernumber

The line number.

stackTracestring

The stack trace.

requeststring

The request id.

Members

columnNumber

Gets the column number.

lineNumber

Gets the line number.

request

Gets the request ID.

stackTrace

Gets the stack trace.

type

Gets the type of the initiator.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Input.html b/docs/api/javascript/Input.html index cacabbc2f69c2..47c7c230b51db 100644 --- a/docs/api/javascript/Input.html +++ b/docs/api/javascript/Input.html @@ -1,3 +1,3 @@ Class: Input
On this page

Input

Represents commands and events related to the Input module (simulated user input). Described in https://w3c.github.io/webdriver-bidi/#module-input.

Constructor

new Input()

Methods

(async) perform(browsingContextId, actions) → {Promise}

Performs the specified actions on the given browsing context.

Parameters:
NameTypeDescription
browsingContextIdstring

The ID of the browsing context.

actionsArray

The actions to be performed.

Returns:

A promise that resolves with the response from the server.

Type: 
Promise

(async) release(browsingContextId) → {Promise}

Resets the input state in the specified browsing context.

Parameters:
NameTypeDescription
browsingContextIdstring

The ID of the browsing context.

Returns:

A promise that resolves when the release actions are sent.

Type: 
Promise

(async) setFiles(browsingContextId, element, files) → {Promise.<void>}

Sets the files property of a given input element.

Parameters:
NameTypeDescription
browsingContextIdstring

The ID of the browsing context.

elementstring | ReferenceValue

The ID of the element or a ReferenceValue object representing the element.

filesstring | Array.<string>

The file path or an array of file paths to be set.

Throws:

If the element is not a string or a ReferenceValue.

Type
Error
Returns:

A promise that resolves when the files are set.

Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Input

Represents commands and events related to the Input module (simulated user input). Described in https://w3c.github.io/webdriver-bidi/#module-input.

Constructor

new Input()

Methods

(async) perform(browsingContextId, actions) → {Promise}

Performs the specified actions on the given browsing context.

Parameters:
NameTypeDescription
browsingContextIdstring

The ID of the browsing context.

actionsArray

The actions to be performed.

Returns:

A promise that resolves with the response from the server.

Type: 
Promise

(async) release(browsingContextId) → {Promise}

Resets the input state in the specified browsing context.

Parameters:
NameTypeDescription
browsingContextIdstring

The ID of the browsing context.

Returns:

A promise that resolves when the release actions are sent.

Type: 
Promise

(async) setFiles(browsingContextId, element, files) → {Promise.<void>}

Sets the files property of a given input element.

Parameters:
NameTypeDescription
browsingContextIdstring

The ID of the browsing context.

elementstring | ReferenceValue

The ID of the element or a ReferenceValue object representing the element.

filesstring | Array.<string>

The file path or an array of file paths to be set.

Throws:

If the element is not a string or a ReferenceValue.

Type
Error
Returns:

A promise that resolves when the files are set.

Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/InsecureCertificateError.html b/docs/api/javascript/InsecureCertificateError.html index 7bef9f3e7e36c..c880351604b71 100644 --- a/docs/api/javascript/InsecureCertificateError.html +++ b/docs/api/javascript/InsecureCertificateError.html @@ -1,3 +1,3 @@ Class: InsecureCertificateError
On this page

InsecureCertificateError

Indicates a navigation event caused the browser to generate a certificate warning. This is usually caused by an expired or invalid TLS certificate.

Constructor

new InsecureCertificateError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

InsecureCertificateError

Indicates a navigation event caused the browser to generate a certificate warning. This is usually caused by an expired or invalid TLS certificate.

Constructor

new InsecureCertificateError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/InvalidArgumentError.html b/docs/api/javascript/InvalidArgumentError.html index 866429696b58a..b8b1628cc2749 100644 --- a/docs/api/javascript/InvalidArgumentError.html +++ b/docs/api/javascript/InvalidArgumentError.html @@ -1,3 +1,3 @@ Class: InvalidArgumentError
On this page

InvalidArgumentError

The arguments passed to a command are either invalid or malformed.

Constructor

new InvalidArgumentError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

InvalidArgumentError

The arguments passed to a command are either invalid or malformed.

Constructor

new InvalidArgumentError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/InvalidCharacterError.html b/docs/api/javascript/InvalidCharacterError.html index b610ee0b68fe2..a4079494dcf82 100644 --- a/docs/api/javascript/InvalidCharacterError.html +++ b/docs/api/javascript/InvalidCharacterError.html @@ -1,3 +1,3 @@ Class: InvalidCharacterError
On this page

InvalidCharacterError

Error thrown if an invalid character is encountered while escaping a CSS identifier.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

InvalidCharacterError

Error thrown if an invalid character is encountered while escaping a CSS identifier.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/InvalidCookieDomainError.html b/docs/api/javascript/InvalidCookieDomainError.html index 9929dbedd4864..4d906871996c8 100644 --- a/docs/api/javascript/InvalidCookieDomainError.html +++ b/docs/api/javascript/InvalidCookieDomainError.html @@ -1,3 +1,3 @@ Class: InvalidCookieDomainError
On this page

InvalidCookieDomainError

An illegal attempt was made to set a cookie under a different domain than the current page.

Constructor

new InvalidCookieDomainError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

InvalidCookieDomainError

An illegal attempt was made to set a cookie under a different domain than the current page.

Constructor

new InvalidCookieDomainError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/InvalidCoordinatesError.html b/docs/api/javascript/InvalidCoordinatesError.html index 30c1633027344..e5e7e1979558d 100644 --- a/docs/api/javascript/InvalidCoordinatesError.html +++ b/docs/api/javascript/InvalidCoordinatesError.html @@ -1,3 +1,3 @@ Class: InvalidCoordinatesError
On this page

InvalidCoordinatesError

The coordinates provided to an interactions operation are invalid.

Constructor

new InvalidCoordinatesError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

InvalidCoordinatesError

The coordinates provided to an interactions operation are invalid.

Constructor

new InvalidCoordinatesError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/InvalidElementStateError.html b/docs/api/javascript/InvalidElementStateError.html index 0fa66421758b0..1fa761614d5b6 100644 --- a/docs/api/javascript/InvalidElementStateError.html +++ b/docs/api/javascript/InvalidElementStateError.html @@ -1,3 +1,3 @@ Class: InvalidElementStateError
On this page

InvalidElementStateError

An element command could not be completed because the element is in an invalid state, e.g. attempting to click an element that is no longer attached to the document.

Constructor

new InvalidElementStateError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

InvalidElementStateError

An element command could not be completed because the element is in an invalid state, e.g. attempting to click an element that is no longer attached to the document.

Constructor

new InvalidElementStateError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/InvalidSelectorError.html b/docs/api/javascript/InvalidSelectorError.html index 161c58d297330..1fa7f3632d272 100644 --- a/docs/api/javascript/InvalidSelectorError.html +++ b/docs/api/javascript/InvalidSelectorError.html @@ -1,3 +1,3 @@ Class: InvalidSelectorError
On this page

InvalidSelectorError

Argument was an invalid selector.

Constructor

new InvalidSelectorError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

InvalidSelectorError

Argument was an invalid selector.

Constructor

new InvalidSelectorError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/JavascriptError.html b/docs/api/javascript/JavascriptError.html index d107f214810c8..d16655f6b574c 100644 --- a/docs/api/javascript/JavascriptError.html +++ b/docs/api/javascript/JavascriptError.html @@ -1,3 +1,3 @@ Class: JavascriptError
On this page

JavascriptError

An error occurred while executing JavaScript supplied by the user.

Constructor

new JavascriptError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

JavascriptError

An error occurred while executing JavaScript supplied by the user.

Constructor

new JavascriptError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/JavascriptLogEntry.html b/docs/api/javascript/JavascriptLogEntry.html index 0469ee0bc036a..e5272da9e31dd 100644 --- a/docs/api/javascript/JavascriptLogEntry.html +++ b/docs/api/javascript/JavascriptLogEntry.html @@ -1,3 +1,3 @@ Class: JavascriptLogEntry
On this page

JavascriptLogEntry

Represents a log entry for JavaScript logs.

Constructor

new JavascriptLogEntry()

Extends

Members

level

Gets the log level.

stackTrace

Gets the log stack trace.

text

Gets the log text.

timeStamp

Gets the log timestamp.

type

Gets the log type.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

JavascriptLogEntry

Represents a log entry for JavaScript logs.

Constructor

new JavascriptLogEntry()

Extends

Members

level

Gets the log level.

stackTrace

Gets the log stack trace.

text

Gets the log text.

timeStamp

Gets the log timestamp.

type

Gets the log type.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Keyboard.html b/docs/api/javascript/Keyboard.html index 68de2f8ebb58c..ce7e5a14f1cd9 100644 --- a/docs/api/javascript/Keyboard.html +++ b/docs/api/javascript/Keyboard.html @@ -1,3 +1,3 @@ Class: Keyboard
On this page

Keyboard

Keyboard input device.

Constructor

new Keyboard(id)

Parameters:
NameTypeDescription
idstring

the device ID.

Methods

(package) keyDown(key) → (non-null) {Action}

Generates a key down action.

Parameters:
NameTypeDescription
keyKey | string | number

the key to press. This key may be specified as a Key value, a specific unicode code point, or a string containing a single unicode code point.

Returns:

a new key down action.

Type: 
Action

(package) keyUp(key) → (non-null) {Action}

Generates a key up action.

Parameters:
NameTypeDescription
keyKey | string | number

the key to press. This key may be specified as a Key value, a specific unicode code point, or a string containing a single unicode code point.

Returns:

a new key up action.

Type: 
Action
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Keyboard

Keyboard input device.

Constructor

new Keyboard(id)

Parameters:
NameTypeDescription
idstring

the device ID.

Methods

(package) keyDown(key) → (non-null) {Action}

Generates a key down action.

Parameters:
NameTypeDescription
keyKey | string | number

the key to press. This key may be specified as a Key value, a specific unicode code point, or a string containing a single unicode code point.

Returns:

a new key down action.

Type: 
Action

(package) keyUp(key) → (non-null) {Action}

Generates a key up action.

Parameters:
NameTypeDescription
keyKey | string | number

the key to press. This key may be specified as a Key value, a specific unicode code point, or a string containing a single unicode code point.

Returns:

a new key up action.

Type: 
Action
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Level.html b/docs/api/javascript/Level.html index 99b313502f92f..823bd1f4f6c8a 100644 --- a/docs/api/javascript/Level.html +++ b/docs/api/javascript/Level.html @@ -1,3 +1,3 @@ Class: Level
On this page

Level

Defines a message level that may be used to control logging output.

Constructor

new Level(name, level)

Parameters:
NameTypeDescription
namestring

the level's name.

levelnumber

the level's numeric value.

Members

name

This logger's name.

value

The numeric log level.

(static, constant) ALL

Indicates all log messages should be recorded.

(static, constant) DEBUG

Log messages with a level of 700 or higher.

(static, constant) FINE

Log messages with a level of 500 or higher.

(static, constant) FINER

Log messages with a level of 400 or higher.

(static, constant) FINEST

Log messages with a level of 300 or higher.

(static, constant) INFO

Log messages with a level of 800 or higher.

(static, constant) OFF

Indicates no log messages should be recorded.

(static, constant) SEVERE

Log messages with a level of 1000 or higher.

(static, constant) WARNING

Log messages with a level of 900 or higher.

Methods

toString()

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Level

Defines a message level that may be used to control logging output.

Constructor

new Level(name, level)

Parameters:
NameTypeDescription
namestring

the level's name.

levelnumber

the level's numeric value.

Members

name

This logger's name.

value

The numeric log level.

(static, constant) ALL

Indicates all log messages should be recorded.

(static, constant) DEBUG

Log messages with a level of 700 or higher.

(static, constant) FINE

Log messages with a level of 500 or higher.

(static, constant) FINER

Log messages with a level of 400 or higher.

(static, constant) FINEST

Log messages with a level of 300 or higher.

(static, constant) INFO

Log messages with a level of 800 or higher.

(static, constant) OFF

Indicates no log messages should be recorded.

(static, constant) SEVERE

Log messages with a level of 1000 or higher.

(static, constant) WARNING

Log messages with a level of 900 or higher.

Methods

toString()

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/LocalValue.html b/docs/api/javascript/LocalValue.html index fad8e38ce9428..36b8edfe6380e 100644 --- a/docs/api/javascript/LocalValue.html +++ b/docs/api/javascript/LocalValue.html @@ -1,3 +1,3 @@ Class: LocalValue
On this page

LocalValue

Described in https://w3c.github.io/webdriver-bidi/#type-script-LocalValue

Constructor

new LocalValue()

Methods

(static) createArrayValue(value) → {LocalValue}

Creates a new LocalValue object with an array.

Parameters:
NameTypeDescription
valueArray

The array.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createBigIntValue(value) → {LocalValue}

Creates a new LocalValue object with a BigInt value.

Parameters:
NameTypeDescription
valueBigInt

The BigInt value.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createBooleanValue(value) → {LocalValue}

Creates a new LocalValue object with a boolean value.

Parameters:
NameTypeDescription
valueboolean

The boolean value.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createChannelValue(value) → {LocalValue}

Creates a new LocalValue object with the given channel value

Parameters:
NameTypeDescription
valueChannelValue

The channel value.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createDateValue(value) → {LocalValue}

Creates a new LocalValue object with date value.

Parameters:
NameTypeDescription
valuestring

The date.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createMapValue(map) → {LocalValue}

Creates a new LocalValue object of map value.

Parameters:
NameTypeDescription
mapMap

The map.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createNullValue() → {LocalValue}

Creates a new LocalValue object with a null value.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createNumberValue(value) → {LocalValue}

Creates a new LocalValue object with a number value.

Parameters:
NameTypeDescription
valuenumber

The number value.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createObjectValue(object) → {LocalValue}

Creates a new LocalValue object from the passed object.

Parameters:
NameTypeDescription
objectObject

The object.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createRegularExpressionValue(value) → {LocalValue}

Creates a new LocalValue object of regular expression value.

Parameters:
NameTypeDescription
valuestring

The value of the regular expression.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createSetValue(value) → {LocalValue}

Creates a new LocalValue object with the specified value.

Parameters:
NameTypeDescription
valueSet

The value to be set.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createSpecialNumberValue(value) → {LocalValue}

Creates a new LocalValue object with a special number value.

Parameters:
NameTypeDescription
valuenumber

The value of the special number.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createStringValue(value) → {LocalValue}

Creates a new LocalValue object with a string value.

Parameters:
NameTypeDescription
valuestring

The string value to be stored in the LocalValue object.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createUndefinedValue() → {LocalValue}

Creates a new LocalValue object with an undefined value.

Returns:
  • The created LocalValue object.
Type: 
LocalValue
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

LocalValue

Described in https://w3c.github.io/webdriver-bidi/#type-script-LocalValue

Constructor

new LocalValue()

Methods

(static) createArrayValue(value) → {LocalValue}

Creates a new LocalValue object with an array.

Parameters:
NameTypeDescription
valueArray

The array.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createBigIntValue(value) → {LocalValue}

Creates a new LocalValue object with a BigInt value.

Parameters:
NameTypeDescription
valueBigInt

The BigInt value.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createBooleanValue(value) → {LocalValue}

Creates a new LocalValue object with a boolean value.

Parameters:
NameTypeDescription
valueboolean

The boolean value.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createChannelValue(value) → {LocalValue}

Creates a new LocalValue object with the given channel value

Parameters:
NameTypeDescription
valueChannelValue

The channel value.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createDateValue(value) → {LocalValue}

Creates a new LocalValue object with date value.

Parameters:
NameTypeDescription
valuestring

The date.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createMapValue(map) → {LocalValue}

Creates a new LocalValue object of map value.

Parameters:
NameTypeDescription
mapMap

The map.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createNullValue() → {LocalValue}

Creates a new LocalValue object with a null value.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createNumberValue(value) → {LocalValue}

Creates a new LocalValue object with a number value.

Parameters:
NameTypeDescription
valuenumber

The number value.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createObjectValue(object) → {LocalValue}

Creates a new LocalValue object from the passed object.

Parameters:
NameTypeDescription
objectObject

The object.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createRegularExpressionValue(value) → {LocalValue}

Creates a new LocalValue object of regular expression value.

Parameters:
NameTypeDescription
valuestring

The value of the regular expression.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createSetValue(value) → {LocalValue}

Creates a new LocalValue object with the specified value.

Parameters:
NameTypeDescription
valueSet

The value to be set.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createSpecialNumberValue(value) → {LocalValue}

Creates a new LocalValue object with a special number value.

Parameters:
NameTypeDescription
valuenumber

The value of the special number.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createStringValue(value) → {LocalValue}

Creates a new LocalValue object with a string value.

Parameters:
NameTypeDescription
valuestring

The string value to be stored in the LocalValue object.

Returns:
  • The created LocalValue object.
Type: 
LocalValue

(static) createUndefinedValue() → {LocalValue}

Creates a new LocalValue object with an undefined value.

Returns:
  • The created LocalValue object.
Type: 
LocalValue
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Locator.html b/docs/api/javascript/Locator.html index 9740752c4beb5..24ffff8c10fbc 100644 --- a/docs/api/javascript/Locator.html +++ b/docs/api/javascript/Locator.html @@ -1,3 +1,3 @@ Class: Locator
On this page

Locator

Represents the locator to locate nodes in the browsing context. Described in https://w3c.github.io/webdriver-bidi/#type-browsingContext-Locator.

Constructor

new Locator()

Methods

(static) css(value) → {Locator}

Creates a new Locator object with CSS selector type.

Parameters:
NameTypeDescription
valuestring

The CSS selector value.

Returns:

A new Locator object with CSS selector type.

Type: 
Locator

(static) innerText(value, ignoreCaseopt, matchTypeopt, maxDepthopt) → {Locator}

Creates a new Locator object with the specified inner text value.

Parameters:
NameTypeAttributesDescription
valuestring

The inner text value to locate.

ignoreCaseboolean | undefined<optional>

Whether to ignore the case when matching the inner text value.

matchTypestring | undefined<optional>

The type of matching to perform (full or partial).

maxDepthnumber | undefined<optional>

The maximum depth to search for the inner text value.

Returns:

A new Locator object with the specified inner text value.

Type: 
Locator

(static) xpath(value) → {Locator}

Creates a new Locator object with the given XPath value.

Parameters:
NameTypeDescription
valuestring

The XPath value.

Returns:

A new Locator object.

Type: 
Locator
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Locator

Represents the locator to locate nodes in the browsing context. Described in https://w3c.github.io/webdriver-bidi/#type-browsingContext-Locator.

Constructor

new Locator()

Methods

(static) css(value) → {Locator}

Creates a new Locator object with CSS selector type.

Parameters:
NameTypeDescription
valuestring

The CSS selector value.

Returns:

A new Locator object with CSS selector type.

Type: 
Locator

(static) innerText(value, ignoreCaseopt, matchTypeopt, maxDepthopt) → {Locator}

Creates a new Locator object with the specified inner text value.

Parameters:
NameTypeAttributesDescription
valuestring

The inner text value to locate.

ignoreCaseboolean | undefined<optional>

Whether to ignore the case when matching the inner text value.

matchTypestring | undefined<optional>

The type of matching to perform (full or partial).

maxDepthnumber | undefined<optional>

The maximum depth to search for the inner text value.

Returns:

A new Locator object with the specified inner text value.

Type: 
Locator

(static) xpath(value) → {Locator}

Creates a new Locator object with the given XPath value.

Parameters:
NameTypeDescription
valuestring

The XPath value.

Returns:

A new Locator object.

Type: 
Locator
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/LogManager.html b/docs/api/javascript/LogManager.html index 6944372f417e1..0785c706736ae 100644 --- a/docs/api/javascript/LogManager.html +++ b/docs/api/javascript/LogManager.html @@ -1,3 +1,3 @@ Class: LogManager
On this page

LogManager

Maintains a collection of loggers.

Constructor

new LogManager()

Methods

getLogger(name) → (non-null) {Logger}

Retrieves a named logger, creating it in the process. This function will implicitly create the requested logger, and any of its parents, if they do not yet exist.

Parameters:
NameTypeDescription
namestring

the logger's name.

Returns:

the requested logger.

Type: 
Logger
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

LogManager

Maintains a collection of loggers.

Constructor

new LogManager()

Methods

getLogger(name) → (non-null) {Logger}

Retrieves a named logger, creating it in the process. This function will implicitly create the requested logger, and any of its parents, if they do not yet exist.

Parameters:
NameTypeDescription
namestring

the logger's name.

Returns:

the requested logger.

Type: 
Logger
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Logger.html b/docs/api/javascript/Logger.html index dce174d73f143..300f317eefce6 100644 --- a/docs/api/javascript/Logger.html +++ b/docs/api/javascript/Logger.html @@ -1,3 +1,3 @@ Class: Logger
On this page

Logger

An object used to log debugging messages. Loggers use a hierarchical, dot-separated naming scheme. For instance, "foo" is considered the parent of the "foo.bar" and an ancestor of "foo.bar.baz".

Each logger may be assigned a log level, which controls which level of messages will be reported to the handlers attached to this instance. If a log level is not explicitly set on a logger, it will inherit its parent.

This class should never be directly instantiated. Instead, users should obtain logger references using the getLogger() function.

Constructor

new Logger(name, opt_levelopt)

Parameters:
NameTypeAttributesDescription
namestring

the name of this logger.

opt_levelLevel<optional>

the initial level for this logger.

Methods

addHandler(handler)

Adds a handler to this logger. The handler will be invoked for each message logged with this instance, or any of its descendants.

Parameters:
NameTypeDescription
handlerfunction

the handler to add.

debug(loggable)

Logs a message at the Level.DEBUG log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

fine(loggable)

Logs a message at the Level.FINE log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

finer(loggable)

Logs a message at the Level.FINER log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

finest(loggable)

Logs a message at the Level.FINEST log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

getEffectiveLevel() → (non-null) {Level}

Returns:

the effective level for this logger.

Type: 
Level

getLevel() → {Level}

Returns:

the log level for this logger.

Type: 
Level

getName() → {string}

Returns:

the name of this logger.

Type: 
string

info(loggable)

Logs a message at the Level.INFO log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

isLoggable(levelnon-null) → {boolean}

Parameters:
NameTypeDescription
levelLevel

the level to check.

Returns:

whether messages recorded at the given level are loggable by this instance.

Type: 
boolean

log(levelnon-null, loggable)

Logs a message at the given level. The message may be defined as a string or as a function that will return the message. If a function is provided, it will only be invoked if this logger's effective log level includes the given level.

Parameters:
NameTypeDescription
levelLevel

the level at which to log the message.

loggablestring | function

the message to log, or a function that will return the message.

removeHandler(handler) → {boolean}

Removes a handler from this logger.

Parameters:
NameTypeDescription
handlerfunction

the handler to remove.

Returns:

whether a handler was successfully removed.

Type: 
boolean

setLevel(level)

Parameters:
NameTypeDescription
levelLevel

the new level for this logger, or null if the logger should inherit its level from its parent logger.

severe(loggable)

Logs a message at the Level.SEVERE log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

warning(loggable)

Logs a message at the Level.WARNING log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Logger

An object used to log debugging messages. Loggers use a hierarchical, dot-separated naming scheme. For instance, "foo" is considered the parent of the "foo.bar" and an ancestor of "foo.bar.baz".

Each logger may be assigned a log level, which controls which level of messages will be reported to the handlers attached to this instance. If a log level is not explicitly set on a logger, it will inherit its parent.

This class should never be directly instantiated. Instead, users should obtain logger references using the getLogger() function.

Constructor

new Logger(name, opt_levelopt)

Parameters:
NameTypeAttributesDescription
namestring

the name of this logger.

opt_levelLevel<optional>

the initial level for this logger.

Methods

addHandler(handler)

Adds a handler to this logger. The handler will be invoked for each message logged with this instance, or any of its descendants.

Parameters:
NameTypeDescription
handlerfunction

the handler to add.

debug(loggable)

Logs a message at the Level.DEBUG log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

fine(loggable)

Logs a message at the Level.FINE log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

finer(loggable)

Logs a message at the Level.FINER log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

finest(loggable)

Logs a message at the Level.FINEST log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

getEffectiveLevel() → (non-null) {Level}

Returns:

the effective level for this logger.

Type: 
Level

getLevel() → {Level}

Returns:

the log level for this logger.

Type: 
Level

getName() → {string}

Returns:

the name of this logger.

Type: 
string

info(loggable)

Logs a message at the Level.INFO log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

isLoggable(levelnon-null) → {boolean}

Parameters:
NameTypeDescription
levelLevel

the level to check.

Returns:

whether messages recorded at the given level are loggable by this instance.

Type: 
boolean

log(levelnon-null, loggable)

Logs a message at the given level. The message may be defined as a string or as a function that will return the message. If a function is provided, it will only be invoked if this logger's effective log level includes the given level.

Parameters:
NameTypeDescription
levelLevel

the level at which to log the message.

loggablestring | function

the message to log, or a function that will return the message.

removeHandler(handler) → {boolean}

Removes a handler from this logger.

Parameters:
NameTypeDescription
handlerfunction

the handler to remove.

Returns:

whether a handler was successfully removed.

Type: 
boolean

setLevel(level)

Parameters:
NameTypeDescription
levelLevel

the new level for this logger, or null if the logger should inherit its level from its parent logger.

severe(loggable)

Logs a message at the Level.SEVERE log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

warning(loggable)

Logs a message at the Level.WARNING log level.

Parameters:
NameTypeDescription
loggablestring | function

the message to log, or a function that will return the message.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Message.html b/docs/api/javascript/Message.html index 04200ae2604f9..1ccabec5e4f5f 100644 --- a/docs/api/javascript/Message.html +++ b/docs/api/javascript/Message.html @@ -1,3 +1,3 @@ Class: Message
On this page

Message

Represents a message received through a channel. Described in https://w3c.github.io/webdriver-bidi/#event-script-message.

Constructor

new Message(channel, data, source)

Creates a new Message instance.

Parameters:
NameTypeDescription
channelstring

The channel through which the message is received.

dataRemoteValue

The data contained in the message.

sourceSource

The source of the message.

Members

channel

Gets the channel through which the message is received.

data

Gets the data contained in the message.

source

Gets the source of the message.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Message

Represents a message received through a channel. Described in https://w3c.github.io/webdriver-bidi/#event-script-message.

Constructor

new Message(channel, data, source)

Creates a new Message instance.

Parameters:
NameTypeDescription
channelstring

The channel through which the message is received.

dataRemoteValue

The data contained in the message.

sourceSource

The source of the message.

Members

channel

Gets the channel through which the message is received.

data

Gets the data contained in the message.

source

Gets the source of the message.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/MoveTargetOutOfBoundsError.html b/docs/api/javascript/MoveTargetOutOfBoundsError.html index 03e24a050cbd8..e932945992184 100644 --- a/docs/api/javascript/MoveTargetOutOfBoundsError.html +++ b/docs/api/javascript/MoveTargetOutOfBoundsError.html @@ -1,3 +1,3 @@ Class: MoveTargetOutOfBoundsError
On this page

MoveTargetOutOfBoundsError

The target for mouse interaction is not in the browser’s viewport and cannot be brought into that viewport.

Constructor

new MoveTargetOutOfBoundsError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

MoveTargetOutOfBoundsError

The target for mouse interaction is not in the browser’s viewport and cannot be brought into that viewport.

Constructor

new MoveTargetOutOfBoundsError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/NavigateResult.html b/docs/api/javascript/NavigateResult.html index df8775aa8ffd2..a5dbf9c8b86d9 100644 --- a/docs/api/javascript/NavigateResult.html +++ b/docs/api/javascript/NavigateResult.html @@ -1,3 +1,3 @@ Class: NavigateResult
On this page

NavigateResult

Represents the result of a navigation operation.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

NavigateResult

Represents the result of a navigation operation.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/NavigationInfo.html b/docs/api/javascript/NavigationInfo.html index 5e4560ae714e8..c95f8c346e109 100644 --- a/docs/api/javascript/NavigationInfo.html +++ b/docs/api/javascript/NavigationInfo.html @@ -1,3 +1,3 @@ Class: NavigationInfo
On this page

NavigationInfo

Represents information about a navigation. Described in https://w3c.github.io/webdriver-bidi/#type-browsingContext-NavigationInfo.

Constructor

Constructs a new NavigationInfo object.

Parameters:
NameTypeDescription
browsingContextIdstring

The ID of the browsing context.

navigationIdstring

The ID of the navigation.

timestampnumber

The timestamp of the navigation.

urlstring

The URL of the page navigated to.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

NavigationInfo

Represents information about a navigation. Described in https://w3c.github.io/webdriver-bidi/#type-browsingContext-NavigationInfo.

Constructor

Constructs a new NavigationInfo object.

Parameters:
NameTypeDescription
browsingContextIdstring

The ID of the browsing context.

navigationIdstring

The ID of the navigation.

timestampnumber

The timestamp of the navigation.

urlstring

The URL of the page navigated to.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Network.html b/docs/api/javascript/Network.html index 73c8e38278ef0..0c4be26a577eb 100644 --- a/docs/api/javascript/Network.html +++ b/docs/api/javascript/Network.html @@ -1,3 +1,3 @@ Class: Network
On this page

Network

Represents all commands and events of Network module. Described in https://w3c.github.io/webdriver-bidi/#module-network.

Constructor

new Network(driver, browsingContextIds)

Represents a Network object.

Parameters:
NameTypeDescription
driverDriver

The driver to fetch the BiDi connection.

browsingContextIdsArray

An array of browsing context IDs that the network events will be subscribed to.

Methods

(async) addIntercept(params) → {Promise.<string>}

Adds a network intercept.

Parameters:
NameTypeDescription
paramsAddInterceptParameters

The parameters for the network intercept.

Throws:
  • If params is not an instance of AddInterceptParameters.
Type
Error
Returns:
  • A promise that resolves to the added intercept's id.
Type: 
Promise.<string>

(async) authRequired(callback) → {Promise.<number>}

Subscribes to the 'network.authRequired' event and handles it with the provided callback.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<number>

(async) beforeRequestSent(callback) → {Promise.<void>}

Subscribes to the 'network.beforeRequestSent' event and handles it with the provided callback.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) cancelAuth(requestId) → {Promise.<void>}

Cancels the authentication for a specific request.

Parameters:
NameTypeDescription
requestIdstring

The ID of the request to cancel authentication for.

Returns:
  • A promise that resolves when the command is sent.
Type: 
Promise.<void>

(async) close() → {Promise.<void>}

Unsubscribes from network events for all browsing contexts.

Returns:

A promise that resolves when the network connection is closed.

Type: 
Promise.<void>

(async) continueRequest(params) → {Promise.<void>}

Continues the network request with the provided parameters.

Parameters:
NameTypeDescription
paramsContinueRequestParameters

The parameters for continuing the request.

Throws:

If params is not an instance of ContinueRequestParameters.

Type
Error
Returns:

A promise that resolves when the command is sent.

Type: 
Promise.<void>

(async) continueResponse(params) → {Promise.<void>}

Continues the network response with the given parameters.

Parameters:
NameTypeDescription
paramsContinueResponseParameters

The parameters for continuing the response.

Throws:

If params is not an instance of ContinueResponseParameters.

Type
Error
Returns:

A promise that resolves when the command is sent.

Type: 
Promise.<void>

(async) continueWithAuth(requestId, username, password) → {Promise.<void>}

Continues the network request with authentication credentials.

Parameters:
NameTypeDescription
requestIdstring

The ID of the request to continue.

usernamestring

The username for authentication.

passwordstring

The password for authentication.

Returns:
  • A promise that resolves when the command is sent.
Type: 
Promise.<void>

(async) continueWithAuthNoCredentials(requestId) → {Promise.<void>}

Continues the network request with authentication but without providing credentials.

Parameters:
NameTypeDescription
requestIdstring

The ID of the request to continue with authentication.

Returns:
  • A promise that resolves when the command is sent.
Type: 
Promise.<void>

(async) failRequest(requestId) → {Promise.<void>}

Fails a network request.

Parameters:
NameTypeDescription
requestIdnumber

The ID of the request to fail.

Returns:
  • A promise that resolves when the command is sent.
Type: 
Promise.<void>

(async) fetchError(callback) → {Promise.<void>}

Subscribes to the 'network.fetchError' event and handles it with the provided callback.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) provideResponse(params) → {Promise.<void>}

Provides a response for the network.

Parameters:
NameTypeDescription
paramsProvideResponseParameters

The parameters for providing the response.

Throws:

If params is not an instance of ProvideResponseParameters.

Type
Error
Returns:

A promise that resolves when the command is sent.

Type: 
Promise.<void>

(async) removeIntercept(interceptId) → {Promise.<void>}

Removes an intercept.

Parameters:
NameTypeDescription
interceptIdstring

The ID of the intercept to be removed.

Returns:
  • A promise that resolves when the intercept is successfully removed.
Type: 
Promise.<void>

(async) responseCompleted(callback) → {Promise.<void>}

Subscribes to the 'network.responseCompleted' event and handles it with the provided callback.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) responseStarted(callback) → {Promise.<void>}

Subscribes to the 'network.responseStarted' event and handles it with the provided callback.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Network

Represents all commands and events of Network module. Described in https://w3c.github.io/webdriver-bidi/#module-network.

Constructor

new Network(driver, browsingContextIds)

Represents a Network object.

Parameters:
NameTypeDescription
driverDriver

The driver to fetch the BiDi connection.

browsingContextIdsArray

An array of browsing context IDs that the network events will be subscribed to.

Methods

(async) addIntercept(params) → {Promise.<string>}

Adds a network intercept.

Parameters:
NameTypeDescription
paramsAddInterceptParameters

The parameters for the network intercept.

Throws:
  • If params is not an instance of AddInterceptParameters.
Type
Error
Returns:
  • A promise that resolves to the added intercept's id.
Type: 
Promise.<string>

(async) authRequired(callback) → {Promise.<number>}

Subscribes to the 'network.authRequired' event and handles it with the provided callback.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<number>

(async) beforeRequestSent(callback) → {Promise.<void>}

Subscribes to the 'network.beforeRequestSent' event and handles it with the provided callback.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) cancelAuth(requestId) → {Promise.<void>}

Cancels the authentication for a specific request.

Parameters:
NameTypeDescription
requestIdstring

The ID of the request to cancel authentication for.

Returns:
  • A promise that resolves when the command is sent.
Type: 
Promise.<void>

(async) close() → {Promise.<void>}

Unsubscribes from network events for all browsing contexts.

Returns:

A promise that resolves when the network connection is closed.

Type: 
Promise.<void>

(async) continueRequest(params) → {Promise.<void>}

Continues the network request with the provided parameters.

Parameters:
NameTypeDescription
paramsContinueRequestParameters

The parameters for continuing the request.

Throws:

If params is not an instance of ContinueRequestParameters.

Type
Error
Returns:

A promise that resolves when the command is sent.

Type: 
Promise.<void>

(async) continueResponse(params) → {Promise.<void>}

Continues the network response with the given parameters.

Parameters:
NameTypeDescription
paramsContinueResponseParameters

The parameters for continuing the response.

Throws:

If params is not an instance of ContinueResponseParameters.

Type
Error
Returns:

A promise that resolves when the command is sent.

Type: 
Promise.<void>

(async) continueWithAuth(requestId, username, password) → {Promise.<void>}

Continues the network request with authentication credentials.

Parameters:
NameTypeDescription
requestIdstring

The ID of the request to continue.

usernamestring

The username for authentication.

passwordstring

The password for authentication.

Returns:
  • A promise that resolves when the command is sent.
Type: 
Promise.<void>

(async) continueWithAuthNoCredentials(requestId) → {Promise.<void>}

Continues the network request with authentication but without providing credentials.

Parameters:
NameTypeDescription
requestIdstring

The ID of the request to continue with authentication.

Returns:
  • A promise that resolves when the command is sent.
Type: 
Promise.<void>

(async) failRequest(requestId) → {Promise.<void>}

Fails a network request.

Parameters:
NameTypeDescription
requestIdnumber

The ID of the request to fail.

Returns:
  • A promise that resolves when the command is sent.
Type: 
Promise.<void>

(async) fetchError(callback) → {Promise.<void>}

Subscribes to the 'network.fetchError' event and handles it with the provided callback.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) provideResponse(params) → {Promise.<void>}

Provides a response for the network.

Parameters:
NameTypeDescription
paramsProvideResponseParameters

The parameters for providing the response.

Throws:

If params is not an instance of ProvideResponseParameters.

Type
Error
Returns:

A promise that resolves when the command is sent.

Type: 
Promise.<void>

(async) removeIntercept(interceptId) → {Promise.<void>}

Removes an intercept.

Parameters:
NameTypeDescription
interceptIdstring

The ID of the intercept to be removed.

Returns:
  • A promise that resolves when the intercept is successfully removed.
Type: 
Promise.<void>

(async) responseCompleted(callback) → {Promise.<void>}

Subscribes to the 'network.responseCompleted' event and handles it with the provided callback.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) responseStarted(callback) → {Promise.<void>}

Subscribes to the 'network.responseStarted' event and handles it with the provided callback.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the event.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) setCacheBehavior(behavior, contextsopt) → {Promise.<void>}

Sets the cache behavior for network requests.

Parameters:
NameTypeAttributesDefaultDescription
behaviorstring

The cache behavior ("default" or "bypass")

contextsArray.<string><optional>
null

Optional array of browsing context IDs

Throws:

If behavior is invalid or context IDs are invalid

Type
Error
Returns:

A promise that resolves when the cache behavior is set

Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/NetworkInspector.html b/docs/api/javascript/NetworkInspector.html index 5dd9a748b4829..31448de045bdd 100644 --- a/docs/api/javascript/NetworkInspector.html +++ b/docs/api/javascript/NetworkInspector.html @@ -1,3 +1,3 @@ Class: NetworkInspector
On this page

NetworkInspector

new NetworkInspector()

Deprecated
  • in favor of using the `Network` class from `bidi/network.js` Inspector is specific to listening to events. Goal is to club commands and events under one class called Network.
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

NetworkInspector

new NetworkInspector()

Deprecated
  • in favor of using the `Network` class from `bidi/network.js` Inspector is specific to listening to events. Goal is to club commands and events under one class called Network.
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/NoSuchAlertError.html b/docs/api/javascript/NoSuchAlertError.html index 8e686447d49de..a73dc9faa8869 100644 --- a/docs/api/javascript/NoSuchAlertError.html +++ b/docs/api/javascript/NoSuchAlertError.html @@ -1,3 +1,3 @@ Class: NoSuchAlertError
On this page

NoSuchAlertError

An attempt was made to operate on a modal dialog when one was not open.

Constructor

new NoSuchAlertError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

NoSuchAlertError

An attempt was made to operate on a modal dialog when one was not open.

Constructor

new NoSuchAlertError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/NoSuchCookieError.html b/docs/api/javascript/NoSuchCookieError.html index 0e4433dbe6ae0..3a485bbc69a07 100644 --- a/docs/api/javascript/NoSuchCookieError.html +++ b/docs/api/javascript/NoSuchCookieError.html @@ -1,3 +1,3 @@ Class: NoSuchCookieError
On this page

NoSuchCookieError

Indicates a named cookie could not be found in the cookie jar for the currently selected document.

Constructor

new NoSuchCookieError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

NoSuchCookieError

Indicates a named cookie could not be found in the cookie jar for the currently selected document.

Constructor

new NoSuchCookieError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/NoSuchElementError.html b/docs/api/javascript/NoSuchElementError.html index d44d627b22250..bca2c8f78a816 100644 --- a/docs/api/javascript/NoSuchElementError.html +++ b/docs/api/javascript/NoSuchElementError.html @@ -1,3 +1,3 @@ Class: NoSuchElementError
On this page

NoSuchElementError

An element could not be located on the page using the given search parameters.

Constructor

new NoSuchElementError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

NoSuchElementError

An element could not be located on the page using the given search parameters.

Constructor

new NoSuchElementError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/NoSuchFrameError.html b/docs/api/javascript/NoSuchFrameError.html index 86edc29022aa7..71c38c57dff6d 100644 --- a/docs/api/javascript/NoSuchFrameError.html +++ b/docs/api/javascript/NoSuchFrameError.html @@ -1,3 +1,3 @@ Class: NoSuchFrameError
On this page

NoSuchFrameError

A request to switch to a frame could not be satisfied because the frame could not be found.

Constructor

new NoSuchFrameError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

NoSuchFrameError

A request to switch to a frame could not be satisfied because the frame could not be found.

Constructor

new NoSuchFrameError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/NoSuchSessionError.html b/docs/api/javascript/NoSuchSessionError.html index 0405a095bacfd..52a81747e60e6 100644 --- a/docs/api/javascript/NoSuchSessionError.html +++ b/docs/api/javascript/NoSuchSessionError.html @@ -1,3 +1,3 @@ Class: NoSuchSessionError
On this page

NoSuchSessionError

Occurs when a command is directed to a session that does not exist.

Constructor

new NoSuchSessionError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

NoSuchSessionError

Occurs when a command is directed to a session that does not exist.

Constructor

new NoSuchSessionError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/NoSuchShadowRootError.html b/docs/api/javascript/NoSuchShadowRootError.html index ed624f4efd47e..7583b36facc4b 100644 --- a/docs/api/javascript/NoSuchShadowRootError.html +++ b/docs/api/javascript/NoSuchShadowRootError.html @@ -1,3 +1,3 @@ Class: NoSuchShadowRootError
On this page

NoSuchShadowRootError

A ShadowRoot could not be located on the element

Constructor

new NoSuchShadowRootError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

NoSuchShadowRootError

A ShadowRoot could not be located on the element

Constructor

new NoSuchShadowRootError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/NoSuchWindowError.html b/docs/api/javascript/NoSuchWindowError.html index c474354f70a9f..cc8d4b86f3653 100644 --- a/docs/api/javascript/NoSuchWindowError.html +++ b/docs/api/javascript/NoSuchWindowError.html @@ -1,3 +1,3 @@ Class: NoSuchWindowError
On this page

NoSuchWindowError

A request to switch to a window could not be satisfied because the window could not be found.

Constructor

new NoSuchWindowError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

NoSuchWindowError

A request to switch to a window could not be satisfied because the window could not be found.

Constructor

new NoSuchWindowError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Options.Cookie.html b/docs/api/javascript/Options.Cookie.html index 382c8a4daab82..9c609157df328 100644 --- a/docs/api/javascript/Options.Cookie.html +++ b/docs/api/javascript/Options.Cookie.html @@ -1,3 +1,3 @@ Interface: Cookie
On this page

Options. Cookie

A record object describing a browser cookie.

Members

domain :string|undefined

The domain the cookie is visible to. Defaults to the current browsing context's document's URL when adding a cookie.

Type:
  • string | undefined

expiry :Date|number|undefined

When the cookie expires.

When adding a cookie, this may be specified as a Date object, or in seconds since Unix epoch (January 1, 1970).

The expiry is always returned in seconds since epoch when retrieving cookies from the browser.

Type:
  • Date | number | undefined

httpOnly :boolean|undefined

Whether the cookie is an HTTP only cookie. Defaults to false when adding a new cookie.

Type:
  • boolean | undefined

name :string

The name of the cookie.

Type:
  • string

path :string|undefined

The cookie path. Defaults to "/" when adding a cookie.

Type:
  • string | undefined

sameSite :string|undefined

When the cookie applies to a SameSite policy.

When adding a cookie, this may be specified as a string object which is one of 'Lax', 'Strict' or 'None'.

Type:
  • string | undefined

secure :boolean|undefined

Whether the cookie is a secure cookie. Defaults to false when adding a new cookie.

Type:
  • boolean | undefined

value :string

The cookie value.

Type:
  • string
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Options. Cookie

A record object describing a browser cookie.

Members

domain :string|undefined

The domain the cookie is visible to. Defaults to the current browsing context's document's URL when adding a cookie.

Type:
  • string | undefined

expiry :Date|number|undefined

When the cookie expires.

When adding a cookie, this may be specified as a Date object, or in seconds since Unix epoch (January 1, 1970).

The expiry is always returned in seconds since epoch when retrieving cookies from the browser.

Type:
  • Date | number | undefined

httpOnly :boolean|undefined

Whether the cookie is an HTTP only cookie. Defaults to false when adding a new cookie.

Type:
  • boolean | undefined

name :string

The name of the cookie.

Type:
  • string

path :string|undefined

The cookie path. Defaults to "/" when adding a cookie.

Type:
  • string | undefined

sameSite :string|undefined

When the cookie applies to a SameSite policy.

When adding a cookie, this may be specified as a string object which is one of 'Lax', 'Strict' or 'None'.

Type:
  • string | undefined

secure :boolean|undefined

Whether the cookie is a secure cookie. Defaults to false when adding a new cookie.

Type:
  • boolean | undefined

value :string

The cookie value.

Type:
  • string
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Options.html b/docs/api/javascript/Options.html index 01fb1bba46d1e..dbf8e290c52d8 100644 --- a/docs/api/javascript/Options.html +++ b/docs/api/javascript/Options.html @@ -1,6 +1,6 @@ Interface: Options
On this page

Options

Options for configuring an executed command.

Interfaces

Cookie

Members

args :!Array.<string>|undefined

Command line arguments for the child process, if any.

Type:
  • !Array.<string> | undefined

env :!Object.<string, string>|undefined

Environment variables for the spawned process. If unspecified, the child will inherit this process' environment.

Type:
  • !Object.<string, string> | undefined

stdio :string|!Array.<(string|number|!stream.Stream|null|undefined)>|undefined

IO conifguration for the spawned server child process. If unspecified, the child process' IO output will be ignored.

Type:
  • string | !Array.<(string|number|!stream.Stream|null|undefined)> | undefined

Methods

addCookie(specnon-null) → (non-null) {Promise.<void>}

Adds a cookie.

Sample Usage:

// Set a basic cookie.
+    
On this page

Options

Options for configuring an executed command.

Interfaces

Cookie

Members

args :!Array.<string>|undefined

Command line arguments for the child process, if any.

Type:
  • !Array.<string> | undefined

env :!Object.<string, string>|undefined

Environment variables for the spawned process. If unspecified, the child will inherit this process' environment.

Type:
  • !Object.<string, string> | undefined

stdio :string|!Array.<(string|number|!stream.Stream|null|undefined)>|undefined

IO conifguration for the spawned server child process. If unspecified, the child process' IO output will be ignored.

Type:
  • string | !Array.<(string|number|!stream.Stream|null|undefined)> | undefined

Methods

addCookie(specnon-null) → (non-null) {Promise.<void>}

Adds a cookie.

Sample Usage:

// Set a basic cookie.
 driver.manage().addCookie({name: 'foo', value: 'bar'});
 
 // Set a cookie that expires in 10 minutes.
@@ -13,4 +13,4 @@
   value: 'bar',
   expiry: Math.floor(Date.now() / 1000)
 });
-
Parameters:
NameTypeDescription
specOptions.Cookie

Defines the cookie to add.

Throws:
  • if any of the cookie parameters are invalid.

    Type
    error.InvalidArgumentError
  • if spec is not a cookie object.

    Type
    TypeError
Returns:

A promise that will be resolved when the cookie has been added to the page.

Type: 
Promise.<void>

deleteAllCookies() → (non-null) {Promise.<void>}

Deletes all cookies visible to the current page.

Returns:

A promise that will be resolved when all cookies have been deleted.

Type: 
Promise.<void>

deleteCookie(name) → (non-null) {Promise.<void>}

Deletes the cookie with the given name. This command is a no-op if there is no cookie with the given name visible to the current page.

Parameters:
NameTypeDescription
namestring

The name of the cookie to delete.

Returns:

A promise that will be resolved when the cookie has been deleted.

Type: 
Promise.<void>

(async) getCookie(name) → (non-null) {Promise.<?Options.Cookie>}

Retrieves the cookie with the given name. Returns null if there is no such cookie. The cookie will be returned as a JSON object as described by the WebDriver wire protocol.

Parameters:
NameTypeDescription
namestring

The name of the cookie to retrieve.

Throws:
    • If the cookie name is empty or invalid.
    Type
    InvalidArgumentError
  • if there is no such cookie.

    Type
    error.NoSuchCookieError
Returns:

A promise that will be resolved with the named cookie

Type: 
Promise.<?Options.Cookie>

getCookies() → (non-null) {Promise.<!Array.<!Options.Cookie>>}

Retrieves all cookies visible to the current page. Each cookie will be returned as a JSON object as described by the WebDriver wire protocol.

Returns:

A promise that will be resolved with the cookies visible to the current browsing context.

Type: 
Promise.<!Array.<!Options.Cookie>>

getTimeouts() → (non-null) {Promise.<{script: number, pageLoad: number, implicit: number}>}

Fetches the timeouts currently configured for the current session.

Returns:

A promise that will be resolved with the timeouts currently configured for the current session.

Type: 
Promise.<{script: number, pageLoad: number, implicit: number}>

logs() → (non-null) {Logs}

Returns:

The interface for managing driver logs.

Type: 
Logs

setTimeouts(conf) → (non-null) {Promise.<void>}

Sets the timeout durations associated with the current session.

The following timeouts are supported (all timeouts are specified in milliseconds):

  • implicit specifies the maximum amount of time to wait for an element locator to succeed when locating elements on the page. Defaults to 0 milliseconds.

  • pageLoad specifies the maximum amount of time to wait for a page to finishing loading. Defaults to 300000 milliseconds.

  • script specifies the maximum amount of time to wait for an evaluated script to run. If set to null, the script timeout will be indefinite. Defaults to 30000 milliseconds.

Parameters:
NameTypeDescription
confObject

The desired timeout configuration.

Throws:

if an invalid options object is provided.

Type
TypeError
Returns:

A promise that will be resolved when the timeouts have been set.

Type: 
Promise.<void>

window() → (non-null) {Window}

Returns:

The interface for managing the current window.

Type: 
Window
Selenium WebDriver JavaScript API
\ No newline at end of file +
Parameters:
NameTypeDescription
specOptions.Cookie

Defines the cookie to add.

Throws:
  • if any of the cookie parameters are invalid.

    Type
    error.InvalidArgumentError
  • if spec is not a cookie object.

    Type
    TypeError
Returns:

A promise that will be resolved when the cookie has been added to the page.

Type: 
Promise.<void>

deleteAllCookies() → (non-null) {Promise.<void>}

Deletes all cookies visible to the current page.

Returns:

A promise that will be resolved when all cookies have been deleted.

Type: 
Promise.<void>

deleteCookie(name) → (non-null) {Promise.<void>}

Deletes the cookie with the given name. This command is a no-op if there is no cookie with the given name visible to the current page.

Parameters:
NameTypeDescription
namestring

The name of the cookie to delete.

Returns:

A promise that will be resolved when the cookie has been deleted.

Type: 
Promise.<void>

(async) getCookie(name) → (non-null) {Promise.<?Options.Cookie>}

Retrieves the cookie with the given name. Returns null if there is no such cookie. The cookie will be returned as a JSON object as described by the WebDriver wire protocol.

Parameters:
NameTypeDescription
namestring

The name of the cookie to retrieve.

Throws:
    • If the cookie name is empty or invalid.
    Type
    InvalidArgumentError
  • if there is no such cookie.

    Type
    error.NoSuchCookieError
Returns:

A promise that will be resolved with the named cookie

Type: 
Promise.<?Options.Cookie>

getCookies() → (non-null) {Promise.<!Array.<!Options.Cookie>>}

Retrieves all cookies visible to the current page. Each cookie will be returned as a JSON object as described by the WebDriver wire protocol.

Returns:

A promise that will be resolved with the cookies visible to the current browsing context.

Type: 
Promise.<!Array.<!Options.Cookie>>

getTimeouts() → (non-null) {Promise.<{script: number, pageLoad: number, implicit: number}>}

Fetches the timeouts currently configured for the current session.

Returns:

A promise that will be resolved with the timeouts currently configured for the current session.

Type: 
Promise.<{script: number, pageLoad: number, implicit: number}>

logs() → (non-null) {Logs}

Returns:

The interface for managing driver logs.

Type: 
Logs

setTimeouts(conf) → (non-null) {Promise.<void>}

Sets the timeout durations associated with the current session.

The following timeouts are supported (all timeouts are specified in milliseconds):

  • implicit specifies the maximum amount of time to wait for an element locator to succeed when locating elements on the page. Defaults to 0 milliseconds.

  • pageLoad specifies the maximum amount of time to wait for a page to finishing loading. Defaults to 300000 milliseconds.

  • script specifies the maximum amount of time to wait for an evaluated script to run. If set to null, the script timeout will be indefinite. Defaults to 30000 milliseconds.

Parameters:
NameTypeDescription
confObject

The desired timeout configuration.

Throws:

if an invalid options object is provided.

Type
TypeError
Returns:

A promise that will be resolved when the timeouts have been set.

Type: 
Promise.<void>

window() → (non-null) {Window}

Returns:

The interface for managing the current window.

Type: 
Window
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/PartialCookie.html b/docs/api/javascript/PartialCookie.html index 063344a98e03d..9b7487c024827 100644 --- a/docs/api/javascript/PartialCookie.html +++ b/docs/api/javascript/PartialCookie.html @@ -1,3 +1,3 @@ Class: PartialCookie
On this page

PartialCookie

Represents a partial cookie used to set cookies. Described in https://w3c.github.io/webdriver-bidi/#command-storage-setCookie.

Constructor

new PartialCookie(name, value, domain)

Represents a partial cookie.

Parameters:
NameTypeDescription
namestring

The name of the cookie.

valueBytesValue

The value of the cookie as an instance of BytesValue.

domainstring

The domain of the cookie.

Methods

expiry(expiry) → {PartialCookie}

Sets the expiry for the cookie.

Parameters:
NameTypeDescription
expirynumber

The expiry time of the cookie.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

httpOnly(httpOnly) → {PartialCookie}

Sets the httpOnly flag for the cookie.

Parameters:
NameTypeDescription
httpOnlyboolean

The value to set for the httpOnly flag.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

path(path) → {PartialCookie}

Sets the path for the cookie.

Parameters:
NameTypeDescription
pathstring

The path for the cookie.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

sameSite(sameSite) → {PartialCookie}

Sets the SameSite attribute for the cookie.

Parameters:
NameTypeDescription
sameSiteSameSite

The SameSite attribute value for the cookie.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

secure(secure) → {PartialCookie}

Sets the secure flag for the cookie.

Parameters:
NameTypeDescription
secureboolean

Indicates whether the cookie should only be sent over secure connections.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

size(size) → {PartialCookie}

Sets the size of the cookie.

Parameters:
NameTypeDescription
sizenumber

The size of the cookie.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

PartialCookie

Represents a partial cookie used to set cookies. Described in https://w3c.github.io/webdriver-bidi/#command-storage-setCookie.

Constructor

new PartialCookie(name, value, domain)

Represents a partial cookie.

Parameters:
NameTypeDescription
namestring

The name of the cookie.

valueBytesValue

The value of the cookie as an instance of BytesValue.

domainstring

The domain of the cookie.

Methods

expiry(expiry) → {PartialCookie}

Sets the expiry for the cookie.

Parameters:
NameTypeDescription
expirynumber

The expiry time of the cookie.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

httpOnly(httpOnly) → {PartialCookie}

Sets the httpOnly flag for the cookie.

Parameters:
NameTypeDescription
httpOnlyboolean

The value to set for the httpOnly flag.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

path(path) → {PartialCookie}

Sets the path for the cookie.

Parameters:
NameTypeDescription
pathstring

The path for the cookie.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

sameSite(sameSite) → {PartialCookie}

Sets the SameSite attribute for the cookie.

Parameters:
NameTypeDescription
sameSiteSameSite

The SameSite attribute value for the cookie.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

secure(secure) → {PartialCookie}

Sets the secure flag for the cookie.

Parameters:
NameTypeDescription
secureboolean

Indicates whether the cookie should only be sent over secure connections.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

size(size) → {PartialCookie}

Sets the size of the cookie.

Parameters:
NameTypeDescription
sizenumber

The size of the cookie.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/PartitionDescriptor.html b/docs/api/javascript/PartitionDescriptor.html index bc8600871d062..6d89da0a8aa08 100644 --- a/docs/api/javascript/PartitionDescriptor.html +++ b/docs/api/javascript/PartitionDescriptor.html @@ -1,3 +1,3 @@ Class: PartitionDescriptor
On this page

PartitionDescriptor

Represents a partition descriptor. Described in https://w3c.github.io/webdriver-bidi/#command-storage-getCookies.

Constructor

new PartitionDescriptor(type)

Constructs a new PartitionDescriptor instance.

Parameters:
NameTypeDescription
typeType

The type of the partition.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

PartitionDescriptor

Represents a partition descriptor. Described in https://w3c.github.io/webdriver-bidi/#command-storage-getCookies.

Constructor

new PartitionDescriptor(type)

Constructs a new PartitionDescriptor instance.

Parameters:
NameTypeDescription
typeType

The type of the partition.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/PartitionKey.html b/docs/api/javascript/PartitionKey.html index 82e0a72e88023..f28acf4639f33 100644 --- a/docs/api/javascript/PartitionKey.html +++ b/docs/api/javascript/PartitionKey.html @@ -1,3 +1,3 @@ Class: PartitionKey
On this page

PartitionKey

Represents a partition key of cookie storage. Described in https://w3c.github.io/webdriver-bidi/#type-storage-PartitionKey.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

PartitionKey

Represents a partition key of cookie storage. Described in https://w3c.github.io/webdriver-bidi/#type-storage-PartitionKey.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Pointer.html b/docs/api/javascript/Pointer.html index b28dd1b28c0c1..795f37b591308 100644 --- a/docs/api/javascript/Pointer.html +++ b/docs/api/javascript/Pointer.html @@ -1,3 +1,3 @@ Class: Pointer
On this page

Pointer

Pointer input device.

Constructor

new Pointer(id, type)

Parameters:
NameTypeDescription
idstring

the device ID.

typePointer.Type

the pointer type.

Members

(static) Type :string

The supported types of pointers.

Type:
  • string
Properties
NameTypeDescription
MOUSEstring
PENstring
TOUCHstring

Methods

(package) cancel() → (non-null) {Action}

Returns:

An action that cancels this pointer's current input.

Type: 
Action

(package) move() → (non-null) {Action}

Creates an action for moving the pointer x and y pixels from the specified origin. The origin may be defined as the pointer's current position, the viewport, or the center of a specific WebElement.

Parameters:
TypeDescription
Returns:

The new action.

Type: 
Action

(package) press(buttonopt, non-null, width, height, pressure, tangentialPressure, tiltX, tiltY, twist, altitudeAngle, azimuthAngle) → (non-null) {Action}

Parameters:
NameTypeAttributesDefaultDescription
buttonButton<optional>

The button to press.

width0
height0
pressure0
tangentialPressure0
tiltX0
tiltY0
twist0
altitudeAngle0
azimuthAngle0
Returns:

An action to press the specified button with this device.

Type: 
Action

(package) release(buttonopt, non-null) → (non-null) {Action}

Parameters:
NameTypeAttributesDescription
buttonButton<optional>

The button to release.

Returns:

An action to release the specified button with this device.

Type: 
Action

toJSON()

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Pointer

Pointer input device.

Constructor

new Pointer(id, type)

Parameters:
NameTypeDescription
idstring

the device ID.

typePointer.Type

the pointer type.

Members

(static) Type :string

The supported types of pointers.

Type:
  • string
Properties
NameTypeDescription
MOUSEstring
PENstring
TOUCHstring

Methods

(package) cancel() → (non-null) {Action}

Returns:

An action that cancels this pointer's current input.

Type: 
Action

(package) move() → (non-null) {Action}

Creates an action for moving the pointer x and y pixels from the specified origin. The origin may be defined as the pointer's current position, the viewport, or the center of a specific WebElement.

Parameters:
TypeDescription
Returns:

The new action.

Type: 
Action

(package) press(buttonopt, non-null, width, height, pressure, tangentialPressure, tiltX, tiltY, twist, altitudeAngle, azimuthAngle) → (non-null) {Action}

Parameters:
NameTypeAttributesDefaultDescription
buttonButton<optional>

The button to press.

width0
height0
pressure0
tangentialPressure0
tiltX0
tiltY0
twist0
altitudeAngle0
azimuthAngle0
Returns:

An action to press the specified button with this device.

Type: 
Action

(package) release(buttonopt, non-null) → (non-null) {Action}

Parameters:
NameTypeAttributesDescription
buttonButton<optional>

The button to release.

Returns:

An action to release the specified button with this device.

Type: 
Action

toJSON()

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Preferences.html b/docs/api/javascript/Preferences.html index 20b1f4e912ef8..5656dea023814 100644 --- a/docs/api/javascript/Preferences.html +++ b/docs/api/javascript/Preferences.html @@ -1,3 +1,3 @@ Class: Preferences
On this page

Preferences

Describes the log preferences for a WebDriver session.

Constructor

new Preferences()

Methods

setLevel(type, level)

Sets the desired logging level for a particular log type.

Parameters:
NameTypeDescription
typestring | Type

The log type.

levelLevel | string | number

The desired log level.

Throws:

if type is not a string.

Type
TypeError

toJSON() → (non-null) {Object.<string, string>}

Converts this instance to its JSON representation.

Returns:

The JSON representation of this set of preferences.

Type: 
Object.<string, string>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Preferences

Describes the log preferences for a WebDriver session.

Constructor

new Preferences()

Methods

setLevel(type, level)

Sets the desired logging level for a particular log type.

Parameters:
NameTypeDescription
typestring | Type

The log type.

levelLevel | string | number

The desired log level.

Throws:

if type is not a string.

Type
TypeError

toJSON() → (non-null) {Object.<string, string>}

Converts this instance to its JSON representation.

Returns:

The JSON representation of this set of preferences.

Type: 
Object.<string, string>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/PrintResult.html b/docs/api/javascript/PrintResult.html index 923cd8df106be..0725f821619fc 100644 --- a/docs/api/javascript/PrintResult.html +++ b/docs/api/javascript/PrintResult.html @@ -1,3 +1,3 @@ Class: PrintResult
On this page

PrintResult

Represents a print result.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

PrintResult

Represents a print result.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ProvideResponseParameters.html b/docs/api/javascript/ProvideResponseParameters.html index 690d82c81e15c..b964b89edda4c 100644 --- a/docs/api/javascript/ProvideResponseParameters.html +++ b/docs/api/javascript/ProvideResponseParameters.html @@ -1,3 +1,3 @@ Class: ProvideResponseParameters
On this page

ProvideResponseParameters

Represents parameters for providingResponse command. Described in https://w3c.github.io/webdriver-bidi/#command-network-provideResponse.

Constructor

new ProvideResponseParameters()

Methods

body(value) → {ProvideResponseParameters}

Sets the body value for the response parameters.

Parameters:
NameTypeDescription
valueBytesValue

The value to set as the body. Must be an instance of BytesValue.

Throws:
  • Throws an error if the value is not an instance of BytesValue.
Type
Error
Returns:
  • Returns the ProvideResponseParameters object for chaining.
Type: 
ProvideResponseParameters

cookies(cookieHeaders) → {ProvideResponseParameters}

Sets the cookie headers for the response.

Parameters:
NameTypeDescription
cookieHeadersArray.<Header>

An array of cookie headers.

Throws:
  • Throws an error if a cookie header is not an instance of Header.
Type
Error
Returns:
  • Returns the ProvideResponseParameters object for chaining.
Type: 
ProvideResponseParameters

headers(headers) → {ProvideResponseParameters}

Sets the headers for the response.

Parameters:
NameTypeDescription
headersArray.<Header>

The headers to be set.

Throws:
  • If the provided header is not an instance of Header.
Type
Error
Returns:
  • Returns the ProvideResponseParameters object for chaining.
Type: 
ProvideResponseParameters

reasonPhrase(reasonPhrase) → {ProvideResponseParameters}

Sets the reason phrase for the response.

Parameters:
NameTypeDescription
reasonPhrasestring

The reason phrase to set.

Throws:
  • If the reason phrase is not a string.
Type
Error
Returns:
  • Returns the ProvideResponseParameters object for chaining.
Type: 
ProvideResponseParameters

statusCode(statusCode) → {ProvideResponseParameters}

Sets the status code for the response.

Parameters:
NameTypeDescription
statusCodenumber

The status code to set.

Throws:
  • If the status code is not an integer.
Type
Error
Returns:
  • Returns the ProvideResponseParameters object for chaining.
Type: 
ProvideResponseParameters
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ProvideResponseParameters

Represents parameters for providingResponse command. Described in https://w3c.github.io/webdriver-bidi/#command-network-provideResponse.

Constructor

new ProvideResponseParameters()

Methods

body(value) → {ProvideResponseParameters}

Sets the body value for the response parameters.

Parameters:
NameTypeDescription
valueBytesValue

The value to set as the body. Must be an instance of BytesValue.

Throws:
  • Throws an error if the value is not an instance of BytesValue.
Type
Error
Returns:
  • Returns the ProvideResponseParameters object for chaining.
Type: 
ProvideResponseParameters

cookies(cookieHeaders) → {ProvideResponseParameters}

Sets the cookie headers for the response.

Parameters:
NameTypeDescription
cookieHeadersArray.<Header>

An array of cookie headers.

Throws:
  • Throws an error if a cookie header is not an instance of Header.
Type
Error
Returns:
  • Returns the ProvideResponseParameters object for chaining.
Type: 
ProvideResponseParameters

headers(headers) → {ProvideResponseParameters}

Sets the headers for the response.

Parameters:
NameTypeDescription
headersArray.<Header>

The headers to be set.

Throws:
  • If the provided header is not an instance of Header.
Type
Error
Returns:
  • Returns the ProvideResponseParameters object for chaining.
Type: 
ProvideResponseParameters

reasonPhrase(reasonPhrase) → {ProvideResponseParameters}

Sets the reason phrase for the response.

Parameters:
NameTypeDescription
reasonPhrasestring

The reason phrase to set.

Throws:
  • If the reason phrase is not a string.
Type
Error
Returns:
  • Returns the ProvideResponseParameters object for chaining.
Type: 
ProvideResponseParameters

statusCode(statusCode) → {ProvideResponseParameters}

Sets the status code for the response.

Parameters:
NameTypeDescription
statusCodenumber

The status code to set.

Throws:
  • If the status code is not an integer.
Type
Error
Returns:
  • Returns the ProvideResponseParameters object for chaining.
Type: 
ProvideResponseParameters
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/RealmInfo.html b/docs/api/javascript/RealmInfo.html index 37b48e960372f..b34b50f8f22bb 100644 --- a/docs/api/javascript/RealmInfo.html +++ b/docs/api/javascript/RealmInfo.html @@ -1,3 +1,3 @@ Class: RealmInfo
On this page

RealmInfo

Represents information about a realm. Described in https://w3c.github.io/webdriver-bidi/#type-script-RealmInfo.

Constructor

new RealmInfo(realmId, origin, realmType)

Constructs a new RealmInfo object.

Parameters:
NameTypeDescription
realmIdstring

The ID of the realm.

originstring

The origin of the realm.

realmTypestring

The type of the realm.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

RealmInfo

Represents information about a realm. Described in https://w3c.github.io/webdriver-bidi/#type-script-RealmInfo.

Constructor

new RealmInfo(realmId, origin, realmType)

Constructs a new RealmInfo object.

Parameters:
NameTypeDescription
realmIdstring

The ID of the realm.

originstring

The origin of the realm.

realmTypestring

The type of the realm.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ReferenceValue.html b/docs/api/javascript/ReferenceValue.html index 5de6cca64989a..ffd5d9fdaa71f 100644 --- a/docs/api/javascript/ReferenceValue.html +++ b/docs/api/javascript/ReferenceValue.html @@ -1,3 +1,3 @@ Class: ReferenceValue
On this page

ReferenceValue

Represents a reference value in the protocol. Described in https://w3c.github.io/webdriver-bidi/#type-script-RemoteReference.

Constructor

new ReferenceValue(handle, sharedId)

Constructs a new ReferenceValue object.

Parameters:
NameTypeDescription
handlestring

The handle value.

sharedIdstring

The shared ID value.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ReferenceValue

Represents a reference value in the protocol. Described in https://w3c.github.io/webdriver-bidi/#type-script-RemoteReference.

Constructor

new ReferenceValue(handle, sharedId)

Constructs a new ReferenceValue object.

Parameters:
NameTypeDescription
handlestring

The handle value.

sharedIdstring

The shared ID value.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/RegExpValue.html b/docs/api/javascript/RegExpValue.html index 250b3615be627..8bc62ff4d73f5 100644 --- a/docs/api/javascript/RegExpValue.html +++ b/docs/api/javascript/RegExpValue.html @@ -1,3 +1,3 @@ Class: RegExpValue
On this page

RegExpValue

Represents a regular expression value. Described in https://w3c.github.io/webdriver-bidi/#type-script-LocalValue.

Constructor

new RegExpValue(pattern, flagsopt)

Constructs a new RegExpValue object.

Parameters:
NameTypeAttributesDefaultDescription
patternstring

The pattern of the regular expression.

flagsstring | null<optional>
null

The flags of the regular expression.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

RegExpValue

Represents a regular expression value. Described in https://w3c.github.io/webdriver-bidi/#type-script-LocalValue.

Constructor

new RegExpValue(pattern, flagsopt)

Constructs a new RegExpValue object.

Parameters:
NameTypeAttributesDefaultDescription
patternstring

The pattern of the regular expression.

flagsstring | null<optional>
null

The flags of the regular expression.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/RelativeBy.html b/docs/api/javascript/RelativeBy.html index 01bf87a4a2d1d..43f1b98975451 100644 --- a/docs/api/javascript/RelativeBy.html +++ b/docs/api/javascript/RelativeBy.html @@ -1,3 +1,3 @@ Class: RelativeBy
On this page

RelativeBy

Describes a mechanism for locating an element relative to others on the page.

Constructor

new RelativeBy(findDetails, filters)

Parameters:
NameTypeDefaultDescription
findDetailsBy
filtersArray.<Object>null

Methods

above(locatorOrElement) → (non-null) {RelativeBy}

Look for elements above the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

below(locatorOrElement) → (non-null) {RelativeBy}

Look for elements below the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

marshall() → (non-null) {Object}

Returns a marshalled version of the RelativeBy

Returns:

Object representation of a WebElement that will be used in #findElements.

Type: 
Object

near(locatorOrElement) → (non-null) {RelativeBy}

Look for elements near the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

straightAbove(locatorOrElement) → (non-null) {RelativeBy}

Look for elements above the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

straightBelow(locatorOrElement) → (non-null) {RelativeBy}

Look for elements below the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

straightToLeftOf(locatorOrElement) → (non-null) {RelativeBy}

Look for elements left the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

straightToRightOf(locatorOrElement) → (non-null) {RelativeBy}

Look for elements right the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

toLeftOf(locatorOrElement) → (non-null) {RelativeBy}

Look for elements left the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

toRightOf(locatorOrElement) → (non-null) {RelativeBy}

Look for elements right the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

toString()

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

RelativeBy

Describes a mechanism for locating an element relative to others on the page.

Constructor

new RelativeBy(findDetails, filters)

Parameters:
NameTypeDefaultDescription
findDetailsBy
filtersArray.<Object>null

Methods

above(locatorOrElement) → (non-null) {RelativeBy}

Look for elements above the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

below(locatorOrElement) → (non-null) {RelativeBy}

Look for elements below the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

marshall() → (non-null) {Object}

Returns a marshalled version of the RelativeBy

Returns:

Object representation of a WebElement that will be used in #findElements.

Type: 
Object

near(locatorOrElement) → (non-null) {RelativeBy}

Look for elements near the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

straightAbove(locatorOrElement) → (non-null) {RelativeBy}

Look for elements above the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

straightBelow(locatorOrElement) → (non-null) {RelativeBy}

Look for elements below the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

straightToLeftOf(locatorOrElement) → (non-null) {RelativeBy}

Look for elements left the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

straightToRightOf(locatorOrElement) → (non-null) {RelativeBy}

Look for elements right the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

toLeftOf(locatorOrElement) → (non-null) {RelativeBy}

Look for elements left the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

toRightOf(locatorOrElement) → (non-null) {RelativeBy}

Look for elements right the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

toString()

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/RemoteValue.html b/docs/api/javascript/RemoteValue.html index 3bbef122b7a4b..cb65b364cbe35 100644 --- a/docs/api/javascript/RemoteValue.html +++ b/docs/api/javascript/RemoteValue.html @@ -1,3 +1,3 @@ Class: RemoteValue
On this page

RemoteValue

Represents a remote value. Described in https://w3c.github.io/webdriver-bidi/#type-script-RemoteValue.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

RemoteValue

Represents a remote value. Described in https://w3c.github.io/webdriver-bidi/#type-script-RemoteValue.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Request.html b/docs/api/javascript/Request.html index 35be88e9fd943..c42fa92ee778e 100644 --- a/docs/api/javascript/Request.html +++ b/docs/api/javascript/Request.html @@ -1,3 +1,3 @@ Class: Request
On this page

Request

Represents a HTTP request message. This class is a "partial" request and only defines the path on the server to send a request to. It is each client's responsibility to build the full URL for the final request.

Constructor

new Request(method, path, opt_dataopt)

Parameters:
NameTypeAttributesDescription
methodstring

The HTTP method to use for the request.

pathstring

The path on the server to send the request to.

opt_dataObject<optional>

This request's non-serialized JSON payload data.

Methods

toString()

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Request

Represents a HTTP request message. This class is a "partial" request and only defines the path on the server to send a request to. It is each client's responsibility to build the full URL for the final request.

Constructor

new Request(method, path, opt_dataopt)

Parameters:
NameTypeAttributesDescription
methodstring

The HTTP method to use for the request.

pathstring

The path on the server to send the request to.

opt_dataObject<optional>

This request's non-serialized JSON payload data.

Methods

toString()

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/RequestData.html b/docs/api/javascript/RequestData.html index 328e222ff8285..4b6eab8624a21 100644 --- a/docs/api/javascript/RequestData.html +++ b/docs/api/javascript/RequestData.html @@ -1,3 +1,3 @@ Class: RequestData
On this page

RequestData

Represents the data of a network request. Described in https://w3c.github.io/webdriver-bidi/#type-network-RequestData.

Constructor

new RequestData()

Members

bodySize

Get the size of the request body in bytes.

cookies

Get the cookies of the request.

headers

Get the headers of the request.

headersSize

Get the size of the headers in bytes.

method

Get the HTTP method of the request.

request

Get the request id.

timings

Get the timing information of the request.

url

Get the URL of the request.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

RequestData

Represents the data of a network request. Described in https://w3c.github.io/webdriver-bidi/#type-network-RequestData.

Constructor

new RequestData()

Members

bodySize

Get the size of the request body in bytes.

cookies

Get the cookies of the request.

headers

Get the headers of the request.

headersSize

Get the size of the headers in bytes.

method

Get the HTTP method of the request.

request

Get the request id.

timings

Get the timing information of the request.

url

Get the URL of the request.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Response.html b/docs/api/javascript/Response.html index 0b0ea22a102c7..55ee805099455 100644 --- a/docs/api/javascript/Response.html +++ b/docs/api/javascript/Response.html @@ -1,3 +1,3 @@ Class: Response
On this page

Response

Represents a HTTP response message.

Constructor

new Response(status, headersnon-null, body)

Parameters:
NameTypeDescription
statusnumber

The response code.

headersObject.<string>

The response headers. All header names will be converted to lowercase strings for consistent lookups.

bodystring

The response body.

Methods

toString()

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Response

Represents a HTTP response message.

Constructor

new Response(status, headersnon-null, body)

Parameters:
NameTypeDescription
statusnumber

The response code.

headersObject.<string>

The response headers. All header names will be converted to lowercase strings for consistent lookups.

bodystring

The response body.

Methods

toString()

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ResponseData.html b/docs/api/javascript/ResponseData.html index aff114f334d49..bd0ea9ed73d39 100644 --- a/docs/api/javascript/ResponseData.html +++ b/docs/api/javascript/ResponseData.html @@ -1,3 +1,3 @@ Class: ResponseData
On this page

ResponseData

Represents the response data received from a network request. Described in https://w3c.github.io/webdriver-bidi/#type-network-ResponseData.

Constructor

new ResponseData()

Members

bodySize

Get the size of the body.

bytesReceived

Gets the number of bytes received.

content

Gets the content.

fromCache

Gets the value indicating whether the data is retrieved from cache.

headerSize

Get the size of the headers.

headers

Get the headers.

mimeType :string

The MIME type of the network resource.

Type:
  • string

protocol

Get the protocol.

status

Get the HTTP status.

statusText

Gets the status text.

url

Get the URL.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ResponseData

Represents the response data received from a network request. Described in https://w3c.github.io/webdriver-bidi/#type-network-ResponseData.

Constructor

new ResponseData()

Members

bodySize

Get the size of the body.

bytesReceived

Gets the number of bytes received.

content

Gets the content.

fromCache

Gets the value indicating whether the data is retrieved from cache.

headerSize

Get the size of the headers.

headers

Get the headers.

mimeType :string

The MIME type of the network resource.

Type:
  • string

protocol

Get the protocol.

status

Get the HTTP status.

statusText

Gets the status text.

url

Get the URL.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ResponseStarted.html b/docs/api/javascript/ResponseStarted.html index c77841b629c0b..ab85bc523bb6c 100644 --- a/docs/api/javascript/ResponseStarted.html +++ b/docs/api/javascript/ResponseStarted.html @@ -1,3 +1,3 @@ Class: ResponseStarted
On this page

ResponseStarted

Represents the ResponseStarted event parameters. Described in https://w3c.github.io/webdriver-bidi/#event-network-responseStarted.

Constructor

new ResponseStarted()

Extends

Members

id

Gets the browsing context ID of the network request.

Gets the navigation information associated with the network request.

redirectCount

Gets the number of redirects that occurred during the network request.

request

Gets the request data for the network request.

response

Get the response data.

timestamp

Gets the timestamp of the network request.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ResponseStarted

Represents the ResponseStarted event parameters. Described in https://w3c.github.io/webdriver-bidi/#event-network-responseStarted.

Constructor

new ResponseStarted()

Extends

Members

id

Gets the browsing context ID of the network request.

Gets the navigation information associated with the network request.

redirectCount

Gets the number of redirects that occurred during the network request.

request

Gets the request data for the network request.

response

Get the response data.

timestamp

Gets the timestamp of the network request.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Result.html b/docs/api/javascript/Result.html index 184188ef2bf06..97841c146775c 100644 --- a/docs/api/javascript/Result.html +++ b/docs/api/javascript/Result.html @@ -1,3 +1,3 @@ Class: Result
On this page

Result

Describes a command's termination conditions.

Constructor

new Result(codenullable, signalnullable)

Parameters:
NameTypeAttributesDescription
codenumber<nullable>

The exit code, or {@code null} if the command did not exit normally.

signalstring<nullable>

The signal used to kill the command, or {@code null}.

Members

(nullable) code :number

Type:
  • number

(nullable) signal :string

Type:
  • string

Methods

toString()

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Result

Describes a command's termination conditions.

Constructor

new Result(codenullable, signalnullable)

Parameters:
NameTypeAttributesDescription
codenumber<nullable>

The exit code, or {@code null} if the command did not exit normally.

signalstring<nullable>

The signal used to kill the command, or {@code null}.

Members

(nullable) code :number

Type:
  • number

(nullable) signal :string

Type:
  • string

Methods

toString()

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ScriptManager.html b/docs/api/javascript/ScriptManager.html index 28c3083a39f97..cac6f43a4fc27 100644 --- a/docs/api/javascript/ScriptManager.html +++ b/docs/api/javascript/ScriptManager.html @@ -1,3 +1,3 @@ Class: ScriptManager
On this page

ScriptManager

Represents class to run events and commands of Script module. Described in https://w3c.github.io/webdriver-bidi/#module-script.

Constructor

new ScriptManager()

Methods

(async) addPreloadScript(functionDeclaration, argumentValueListopt, sandbox|nullopt) → {Promise.<number>}

Adds a preload script.

Parameters:
NameTypeAttributesDefaultDescription
functionDeclarationstring

The declaration of the function to be added as a preload script.

argumentValueListArray.<LocalValue><optional>
[]

The list of argument values to be passed to the preload script function.

sandbox|nullstring<optional>

The sandbox object to be used for the preload script.

Returns:
  • A promise that resolves to the added preload script ID.
Type: 
Promise.<number>

(async) callFunctionInBrowsingContext(realmId, functionDeclaration, awaitPromise, argumentValueList|nullopt, thisParameter|nullopt, resultOwnership|nullopt) → {Promise.<(EvaluateResultSuccess|EvaluateResultException)>}

Calls a function in the specified browsing context.

Parameters:
NameTypeAttributesDescription
realmIdstring

The ID of the browsing context.

functionDeclarationstring

The function to call.

awaitPromiseboolean

Whether to await the promise returned by the function.

argumentValueList|nullArray.<LocalValue><optional>

The list of argument values to pass to the function.

thisParameter|nullObject<optional>

The value of 'this' parameter for the function.

resultOwnership|nullResultOwnership<optional>

The ownership of the result.

Returns:
  • A promise that resolves to the evaluation result or exception.
Type: 
Promise.<(EvaluateResultSuccess|EvaluateResultException)>

(async) callFunctionInRealm(realmId, functionDeclaration, awaitPromise, argumentValueList|nullopt, thisParameter|nullopt, resultOwnership|nullopt) → {Promise.<(EvaluateResultSuccess|EvaluateResultException)>}

Calls a function in the specified realm.

Parameters:
NameTypeAttributesDescription
realmIdstring

The ID of the realm.

functionDeclarationstring

The function to call.

awaitPromiseboolean

Whether to await the promise returned by the function.

argumentValueList|nullArray.<LocalValue><optional>

The list of argument values to pass to the function.

thisParameter|nullObject<optional>

The value of 'this' parameter for the function.

resultOwnership|nullResultOwnership<optional>

The ownership of the result.

Returns:
  • A promise that resolves to the evaluation result or exception.
Type: 
Promise.<(EvaluateResultSuccess|EvaluateResultException)>

(async) disownBrowsingContextScript(browsingContextId, handles, sandboxopt) → {Promise.<void>}

Disowns the handles in the specified browsing context.

Parameters:
NameTypeAttributesDefaultDescription
browsingContextIdstring

The ID of the browsing context.

handlesArray.<string>

The handles to disown to allow garbage collection.

sandboxString | null<optional>
null

The sandbox name.

Returns:
  • A promise that resolves when the command is sent.
Type: 
Promise.<void>

(async) disownRealmScript(realmId, handles) → {Promise.<void>}

Disowns the handles in the specified realm.

Parameters:
NameTypeDescription
realmIdstring

The ID of the realm.

handlesArray.<string>

The handles to disown to allow garbage collection.

Returns:
  • A promise that resolves when the command is sent.
Type: 
Promise.<void>

(async) evaluateFunctionInBrowsingContext(realmId, expression, awaitPromise, resultOwnership) → {Promise.<(EvaluateResultSuccess|EvaluateResultException)>}

Evaluates a function in the browsing context.

Parameters:
NameTypeDescription
realmIdstring

The ID of the browsing context.

expressionstring

The expression to function to evaluate.

awaitPromiseboolean

Whether to await the promise.

resultOwnershipResultOwnership | null

The ownership of the result.

Returns:
  • A promise that resolves to the evaluation result or exception.
Type: 
Promise.<(EvaluateResultSuccess|EvaluateResultException)>

(async) evaluateFunctionInRealm(realmId, expression, awaitPromise, resultOwnership) → {Promise.<(EvaluateResultSuccess|EvaluateResultException)>}

Evaluates a function in the specified realm.

Parameters:
NameTypeDefaultDescription
realmIdstring

The ID of the realm.

expressionstring

The expression to function to evaluate.

awaitPromiseboolean

Whether to await the promise.

resultOwnershipResultOwnership | nullnull

The ownership of the result.

Returns:
  • A promise that resolves to the evaluation result or exception.
Type: 
Promise.<(EvaluateResultSuccess|EvaluateResultException)>

(async) getAllRealms() → {Promise.<Array.<RealmInfo>>}

Retrieves all realms.

Returns:
  • A promise that resolves to an array of RealmInfo objects.
Type: 
Promise.<Array.<RealmInfo>>

(async) getRealmsByType(type) → {Promise.<Array.<RealmInfo>>}

Retrieves the realms by type.

Parameters:
NameTypeDescription
typeType

The type of realms to retrieve.

Returns:
  • A promise that resolves to an array of RealmInfo objects.
Type: 
Promise.<Array.<RealmInfo>>

(async) getRealmsInBrowsingContext(browsingContext) → {Promise.<Array.<RealmInfo>>}

Retrieves the realms in the specified browsing context.

Parameters:
NameTypeDescription
browsingContextstring

The browsing context ID.

Returns:
  • A promise that resolves to an array of RealmInfo objects.
Type: 
Promise.<Array.<RealmInfo>>

(async) getRealmsInBrowsingContextByType(browsingContext, type) → {Promise.<Array.<RealmInfo>>}

Retrieves the realms in a browsing context based on the specified type.

Parameters:
NameTypeDescription
browsingContextstring

The browsing context ID.

typestring

The type of realms to retrieve.

Returns:
  • A promise that resolves to an array of RealmInfo objects.
Type: 
Promise.<Array.<RealmInfo>>

(async) onMessage(callback) → {Promise.<void>}

Subscribes to the 'script.message' event and handles the callback function when a message is received.

Parameters:
NameTypeDescription
callbackfunction

The callback function to be executed when a message is received.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) onRealmCreated(callback) → {Promise.<void>}

Subscribes to the 'script.realmCreated' event and handles it with the provided callback.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the 'script.realmCreated' event.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) onRealmDestroyed(callback) → {Promise.<void>}

Subscribes to the 'script.realmDestroyed' event and handles it with the provided callback function.

Parameters:
NameTypeDescription
callbackfunction

The callback function to be executed when the 'script.realmDestroyed' event occurs.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) removePreloadScript(script) → {Promise.<any>}

Removes a preload script.

Parameters:
NameTypeDescription
scriptstring

The ID for the script to be removed.

Throws:
  • If an error occurs during the removal process.
Type
WebDriverError
Returns:
  • A promise that resolves with the result of the removal.
Type: 
Promise.<any>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ScriptManager

Represents class to run events and commands of Script module. Described in https://w3c.github.io/webdriver-bidi/#module-script.

Constructor

new ScriptManager()

Methods

(async) addPreloadScript(functionDeclaration, argumentValueListopt, sandbox|nullopt) → {Promise.<number>}

Adds a preload script.

Parameters:
NameTypeAttributesDefaultDescription
functionDeclarationstring

The declaration of the function to be added as a preload script.

argumentValueListArray.<LocalValue><optional>
[]

The list of argument values to be passed to the preload script function.

sandbox|nullstring<optional>

The sandbox object to be used for the preload script.

Returns:
  • A promise that resolves to the added preload script ID.
Type: 
Promise.<number>

(async) callFunctionInBrowsingContext(realmId, functionDeclaration, awaitPromise, argumentValueList|nullopt, thisParameter|nullopt, resultOwnership|nullopt) → {Promise.<(EvaluateResultSuccess|EvaluateResultException)>}

Calls a function in the specified browsing context.

Parameters:
NameTypeAttributesDescription
realmIdstring

The ID of the browsing context.

functionDeclarationstring

The function to call.

awaitPromiseboolean

Whether to await the promise returned by the function.

argumentValueList|nullArray.<LocalValue><optional>

The list of argument values to pass to the function.

thisParameter|nullObject<optional>

The value of 'this' parameter for the function.

resultOwnership|nullResultOwnership<optional>

The ownership of the result.

Returns:
  • A promise that resolves to the evaluation result or exception.
Type: 
Promise.<(EvaluateResultSuccess|EvaluateResultException)>

(async) callFunctionInRealm(realmId, functionDeclaration, awaitPromise, argumentValueList|nullopt, thisParameter|nullopt, resultOwnership|nullopt) → {Promise.<(EvaluateResultSuccess|EvaluateResultException)>}

Calls a function in the specified realm.

Parameters:
NameTypeAttributesDescription
realmIdstring

The ID of the realm.

functionDeclarationstring

The function to call.

awaitPromiseboolean

Whether to await the promise returned by the function.

argumentValueList|nullArray.<LocalValue><optional>

The list of argument values to pass to the function.

thisParameter|nullObject<optional>

The value of 'this' parameter for the function.

resultOwnership|nullResultOwnership<optional>

The ownership of the result.

Returns:
  • A promise that resolves to the evaluation result or exception.
Type: 
Promise.<(EvaluateResultSuccess|EvaluateResultException)>

(async) disownBrowsingContextScript(browsingContextId, handles, sandboxopt) → {Promise.<void>}

Disowns the handles in the specified browsing context.

Parameters:
NameTypeAttributesDefaultDescription
browsingContextIdstring

The ID of the browsing context.

handlesArray.<string>

The handles to disown to allow garbage collection.

sandboxString | null<optional>
null

The sandbox name.

Returns:
  • A promise that resolves when the command is sent.
Type: 
Promise.<void>

(async) disownRealmScript(realmId, handles) → {Promise.<void>}

Disowns the handles in the specified realm.

Parameters:
NameTypeDescription
realmIdstring

The ID of the realm.

handlesArray.<string>

The handles to disown to allow garbage collection.

Returns:
  • A promise that resolves when the command is sent.
Type: 
Promise.<void>

(async) evaluateFunctionInBrowsingContext(realmId, expression, awaitPromise, resultOwnership) → {Promise.<(EvaluateResultSuccess|EvaluateResultException)>}

Evaluates a function in the browsing context.

Parameters:
NameTypeDescription
realmIdstring

The ID of the browsing context.

expressionstring

The expression to function to evaluate.

awaitPromiseboolean

Whether to await the promise.

resultOwnershipResultOwnership | null

The ownership of the result.

Returns:
  • A promise that resolves to the evaluation result or exception.
Type: 
Promise.<(EvaluateResultSuccess|EvaluateResultException)>

(async) evaluateFunctionInRealm(realmId, expression, awaitPromise, resultOwnership) → {Promise.<(EvaluateResultSuccess|EvaluateResultException)>}

Evaluates a function in the specified realm.

Parameters:
NameTypeDefaultDescription
realmIdstring

The ID of the realm.

expressionstring

The expression to function to evaluate.

awaitPromiseboolean

Whether to await the promise.

resultOwnershipResultOwnership | nullnull

The ownership of the result.

Returns:
  • A promise that resolves to the evaluation result or exception.
Type: 
Promise.<(EvaluateResultSuccess|EvaluateResultException)>

(async) getAllRealms() → {Promise.<Array.<RealmInfo>>}

Retrieves all realms.

Returns:
  • A promise that resolves to an array of RealmInfo objects.
Type: 
Promise.<Array.<RealmInfo>>

(async) getRealmsByType(type) → {Promise.<Array.<RealmInfo>>}

Retrieves the realms by type.

Parameters:
NameTypeDescription
typeType

The type of realms to retrieve.

Returns:
  • A promise that resolves to an array of RealmInfo objects.
Type: 
Promise.<Array.<RealmInfo>>

(async) getRealmsInBrowsingContext(browsingContext) → {Promise.<Array.<RealmInfo>>}

Retrieves the realms in the specified browsing context.

Parameters:
NameTypeDescription
browsingContextstring

The browsing context ID.

Returns:
  • A promise that resolves to an array of RealmInfo objects.
Type: 
Promise.<Array.<RealmInfo>>

(async) getRealmsInBrowsingContextByType(browsingContext, type) → {Promise.<Array.<RealmInfo>>}

Retrieves the realms in a browsing context based on the specified type.

Parameters:
NameTypeDescription
browsingContextstring

The browsing context ID.

typestring

The type of realms to retrieve.

Returns:
  • A promise that resolves to an array of RealmInfo objects.
Type: 
Promise.<Array.<RealmInfo>>

(async) onMessage(callback) → {Promise.<void>}

Subscribes to the 'script.message' event and handles the callback function when a message is received.

Parameters:
NameTypeDescription
callbackfunction

The callback function to be executed when a message is received.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) onRealmCreated(callback) → {Promise.<void>}

Subscribes to the 'script.realmCreated' event and handles it with the provided callback.

Parameters:
NameTypeDescription
callbackfunction

The callback function to handle the 'script.realmCreated' event.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) onRealmDestroyed(callback) → {Promise.<void>}

Subscribes to the 'script.realmDestroyed' event and handles it with the provided callback function.

Parameters:
NameTypeDescription
callbackfunction

The callback function to be executed when the 'script.realmDestroyed' event occurs.

Returns:
  • A promise that resolves when the subscription is successful.
Type: 
Promise.<void>

(async) removePreloadScript(script) → {Promise.<any>}

Removes a preload script.

Parameters:
NameTypeDescription
scriptstring

The ID for the script to be removed.

Throws:
  • If an error occurs during the removal process.
Type
WebDriverError
Returns:
  • A promise that resolves with the result of the removal.
Type: 
Promise.<any>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ScriptTimeoutError.html b/docs/api/javascript/ScriptTimeoutError.html index 29da40e10a801..f77efd8ee973d 100644 --- a/docs/api/javascript/ScriptTimeoutError.html +++ b/docs/api/javascript/ScriptTimeoutError.html @@ -1,3 +1,3 @@ Class: ScriptTimeoutError
On this page

ScriptTimeoutError

A script did not complete before its timeout expired.

Constructor

new ScriptTimeoutError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ScriptTimeoutError

A script did not complete before its timeout expired.

Constructor

new ScriptTimeoutError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Select.html b/docs/api/javascript/Select.html index 2964fa23e0679..045bb92dddcbb 100644 --- a/docs/api/javascript/Select.html +++ b/docs/api/javascript/Select.html @@ -1,3 +1,3 @@ Class: Select
On this page

Select

new Select(element)

Create an Select Element

Parameters:
NameTypeDescription
elementWebElement

Select WebElement.

Implements

Methods

(async) deselectAll() → {Promise.<void>}

Deselects all selected options

Returns:
Type: 
Promise.<void>

(async) deselectByIndex(index) → {Promise.<void>}

Parameters:
NameTypeDescription
indexNumber

index of option element to deselect Deselect the option at the given index. This is done by examining the "index" attribute of an element, and not merely by counting.

Returns:
Type: 
Promise.<void>

(async) deselectByValue(value) → {Promise.<void>}

Parameters:
NameTypeDescription
valueString

value of an option to deselect

Returns:
Type: 
Promise.<void>

(async) deselectByVisibleText(text) → {Promise.<void>}

Parameters:
NameTypeDescription
textstring | Number

text of option to deselect

Returns:
Type: 
Promise.<void>

(async) getAllSelectedOptions() → {Promise.<void>}

Returns a list of all selected options belonging to this select tag

Returns:
Type: 
Promise.<void>

(async) getFirstSelectedOption() → {Promise.<Element>}

Returns first Selected Option

Returns:
Type: 
Promise.<Element>

(async) getOptions() → (non-null) {Promise.<!Array.<!WebElement>>}

Returns a list of all options belonging to this select tag

Returns:
Type: 
Promise.<!Array.<!WebElement>>

(async) isMultiple() → {Promise.<boolean>}

Returns a boolean value if the select tag is multiple

Returns:
Type: 
Promise.<boolean>

(async) selectByIndex(index)

Select option with specified index.

const selectBox = await driver.findElement(By.id("selectbox")); await selectObject.selectByIndex(1);
Parameters:
NameTypeDescription
index

(async) selectByValue(value)

Select option by specific value.

const selectBox = await driver.findElement(By.id("selectbox")); await selectObject.selectByVisibleText("Option 2");
Parameters:
NameTypeDescription
valuestring

value of option element to be selected

(async) selectByVisibleText(text)

Select option with displayed text matching the argument.

const selectBox = await driver.findElement(By.id("selectbox")); await selectObject.selectByVisibleText("Option 2");
Parameters:
NameTypeDescription
textString | Number

text of option element to get selected

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Select

new Select(element)

Create an Select Element

Parameters:
NameTypeDescription
elementWebElement

Select WebElement.

Implements

Methods

(async) deselectAll() → {Promise.<void>}

Deselects all selected options

Returns:
Type: 
Promise.<void>

(async) deselectByIndex(index) → {Promise.<void>}

Parameters:
NameTypeDescription
indexNumber

index of option element to deselect Deselect the option at the given index. This is done by examining the "index" attribute of an element, and not merely by counting.

Returns:
Type: 
Promise.<void>

(async) deselectByValue(value) → {Promise.<void>}

Parameters:
NameTypeDescription
valueString

value of an option to deselect

Returns:
Type: 
Promise.<void>

(async) deselectByVisibleText(text) → {Promise.<void>}

Parameters:
NameTypeDescription
textstring | Number

text of option to deselect

Returns:
Type: 
Promise.<void>

(async) getAllSelectedOptions() → {Promise.<void>}

Returns a list of all selected options belonging to this select tag

Returns:
Type: 
Promise.<void>

(async) getFirstSelectedOption() → {Promise.<Element>}

Returns first Selected Option

Returns:
Type: 
Promise.<Element>

(async) getOptions() → (non-null) {Promise.<!Array.<!WebElement>>}

Returns a list of all options belonging to this select tag

Returns:
Type: 
Promise.<!Array.<!WebElement>>

(async) isMultiple() → {Promise.<boolean>}

Returns a boolean value if the select tag is multiple

Returns:
Type: 
Promise.<boolean>

(async) selectByIndex(index)

Select option with specified index.

const selectBox = await driver.findElement(By.id("selectbox")); await selectObject.selectByIndex(1);
Parameters:
NameTypeDescription
index

(async) selectByValue(value)

Select option by specific value.

const selectBox = await driver.findElement(By.id("selectbox")); await selectObject.selectByVisibleText("Option 2");
Parameters:
NameTypeDescription
valuestring

value of option element to be selected

(async) selectByVisibleText(text)

Select option with displayed text matching the argument.

const selectBox = await driver.findElement(By.id("selectbox")); await selectObject.selectByVisibleText("Option 2");
Parameters:
NameTypeDescription
textString | Number

text of option element to get selected

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/SeleniumServer.Options.html b/docs/api/javascript/SeleniumServer.Options.html index 9ae6d8f43a291..1271a9e4ffb0d 100644 --- a/docs/api/javascript/SeleniumServer.Options.html +++ b/docs/api/javascript/SeleniumServer.Options.html @@ -1,3 +1,3 @@ Interface: Options
On this page

SeleniumServer. Options

A record object describing configuration options for a SeleniumServer instance.

Members

(non-null) args :Array.<string>|IThenable.<!Array.<string>>

The arguments to pass to the service. If a promise is provided, the service will wait for it to resolve before starting.

Type:
  • Array.<string> | IThenable.<!Array.<string>>

env :!Object.<string, string>|undefined

The environment variables that should be visible to the server process. Defaults to inheriting the current process's environment.

Type:
  • !Object.<string, string> | undefined

jvmArgs :!Array.<string>|!IThenable.<!Array.<string>>|undefined

The arguments to pass to the JVM. If a promise is provided, the service will wait for it to resolve before starting.

Type:
  • !Array.<string> | !IThenable.<!Array.<string>> | undefined

loopback :boolean|undefined

Whether the server should only be accessible on this host's loopback address.

Type:
  • boolean | undefined

port :number|!IThenable.<number>

The port to start the server on (must be > 0). If the port is provided as a promise, the service will wait for the promise to resolve before starting.

Type:
  • number | !IThenable.<number>

stdio :string|!Array.<(string|number|!stream.Stream|null|undefined)>|undefined

IO configuration for the spawned server process. If unspecified, IO will be ignored.

Type:
  • string | !Array.<(string|number|!stream.Stream|null|undefined)> | undefined
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

SeleniumServer. Options

A record object describing configuration options for a SeleniumServer instance.

Members

(non-null) args :Array.<string>|IThenable.<!Array.<string>>

The arguments to pass to the service. If a promise is provided, the service will wait for it to resolve before starting.

Type:
  • Array.<string> | IThenable.<!Array.<string>>

env :!Object.<string, string>|undefined

The environment variables that should be visible to the server process. Defaults to inheriting the current process's environment.

Type:
  • !Object.<string, string> | undefined

jvmArgs :!Array.<string>|!IThenable.<!Array.<string>>|undefined

The arguments to pass to the JVM. If a promise is provided, the service will wait for it to resolve before starting.

Type:
  • !Array.<string> | !IThenable.<!Array.<string>> | undefined

loopback :boolean|undefined

Whether the server should only be accessible on this host's loopback address.

Type:
  • boolean | undefined

port :number|!IThenable.<number>

The port to start the server on (must be > 0). If the port is provided as a promise, the service will wait for the promise to resolve before starting.

Type:
  • number | !IThenable.<number>

stdio :string|!Array.<(string|number|!stream.Stream|null|undefined)>|undefined

IO configuration for the spawned server process. If unspecified, IO will be ignored.

Type:
  • string | !Array.<(string|number|!stream.Stream|null|undefined)> | undefined
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/SeleniumServer.html b/docs/api/javascript/SeleniumServer.html index 0f2808ea49f08..2bbf3bcadd5d3 100644 --- a/docs/api/javascript/SeleniumServer.html +++ b/docs/api/javascript/SeleniumServer.html @@ -1,3 +1,3 @@ Class: SeleniumServer
On this page

SeleniumServer

Manages the life and death of the standalone Selenium server.

Constructor

new SeleniumServer(jar, opt_optionsopt)

Parameters:
NameTypeAttributesDescription
jarstring

Path to the Selenium server jar.

opt_optionsSeleniumServer.Options<optional>

Configuration options for the server.

Throws:

If the path to the Selenium jar is not specified or if an invalid port is specified.

Type
Error

Interfaces

Options
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

SeleniumServer

Manages the life and death of the standalone Selenium server.

Constructor

new SeleniumServer(jar, opt_optionsopt)

Parameters:
NameTypeAttributesDescription
jarstring

Path to the Selenium server jar.

opt_optionsSeleniumServer.Options<optional>

Configuration options for the server.

Throws:

If the path to the Selenium jar is not specified or if an invalid port is specified.

Type
Error

Interfaces

Options
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/SerializationOptions.html b/docs/api/javascript/SerializationOptions.html index 83385d050cefc..7c26e7f19f415 100644 --- a/docs/api/javascript/SerializationOptions.html +++ b/docs/api/javascript/SerializationOptions.html @@ -1,3 +1,3 @@ Class: SerializationOptions
On this page

SerializationOptions

Represents serialization options. Described in https://w3c.github.io/webdriver-bidi/#type-script-SerializationOptions.

Constructor

new SerializationOptions(maxDomDepthopt, maxObjectDepthopt, includeShadowTreeopt)

Constructs a new instance of SerializationOptions.

Parameters:
NameTypeAttributesDefaultDescription
maxDomDepthnumber<optional>
0

The maximum depth to serialize the DOM.

maxObjectDepthnumber | null<optional>
null

The maximum depth to serialize objects.

includeShadowTree'none' | 'open' | 'all'<optional>
'none'

The inclusion level of the shadow tree.

Throws:

If the includeShadowTree value is not one of 'none', 'open', or 'all'.

Type
Error
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

SerializationOptions

Represents serialization options. Described in https://w3c.github.io/webdriver-bidi/#type-script-SerializationOptions.

Constructor

new SerializationOptions(maxDomDepthopt, maxObjectDepthopt, includeShadowTreeopt)

Constructs a new instance of SerializationOptions.

Parameters:
NameTypeAttributesDefaultDescription
maxDomDepthnumber<optional>
0

The maximum depth to serialize the DOM.

maxObjectDepthnumber | null<optional>
null

The maximum depth to serialize objects.

includeShadowTree'none' | 'open' | 'all'<optional>
'none'

The inclusion level of the shadow tree.

Throws:

If the includeShadowTree value is not one of 'none', 'open', or 'all'.

Type
Error
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Server.html b/docs/api/javascript/Server.html index ebff4785e6037..eb3ab5108325a 100644 --- a/docs/api/javascript/Server.html +++ b/docs/api/javascript/Server.html @@ -1,3 +1,3 @@ Class: Server
On this page

Server

new Server(requestHandler)

Encapsulates a simple HTTP server for testing. The {@code onrequest} function should be overridden to define request handling behavior.

Parameters:
NameTypeDescription
requestHandlerfunction

The request handler for the server.

Methods

address() → {Host}

Throws:

If the server is not running.

Type
Error
Returns:

This server's host info.

Type: 
Host

host()

return {string} The host:port of this server.

Throws:

If the server is not running.

Type
Error

start(opt_portopt) → (non-null) {Promise.<Host>}

Starts the server on the given port. If no port, or 0, is provided, the server will be started on a random port.

Parameters:
NameTypeAttributesDescription
opt_portnumber<optional>

The port to start on.

Returns:

A promise that will resolve with the server host when it has fully started.

Type: 
Promise.<Host>

stop() → (non-null) {Promise}

Stops the server.

Returns:

A promise that will resolve when the server has closed all connections.

Type: 
Promise

url(opt_pathnameopt) → {string}

Formats a URL for this server.

Parameters:
NameTypeAttributesDescription
opt_pathnamestring<optional>

The desired pathname on the server.

Throws:

If the server is not running.

Type
Error
Returns:

The formatted URL.

Type: 
string

Type Definitions

Host

Type:
  • Object
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Server

new Server(requestHandler)

Encapsulates a simple HTTP server for testing. The {@code onrequest} function should be overridden to define request handling behavior.

Parameters:
NameTypeDescription
requestHandlerfunction

The request handler for the server.

Methods

address() → {Host}

Throws:

If the server is not running.

Type
Error
Returns:

This server's host info.

Type: 
Host

host()

return {string} The host:port of this server.

Throws:

If the server is not running.

Type
Error

start(opt_portopt) → (non-null) {Promise.<Host>}

Starts the server on the given port. If no port, or 0, is provided, the server will be started on a random port.

Parameters:
NameTypeAttributesDescription
opt_portnumber<optional>

The port to start on.

Returns:

A promise that will resolve with the server host when it has fully started.

Type: 
Promise.<Host>

stop() → (non-null) {Promise}

Stops the server.

Returns:

A promise that will resolve when the server has closed all connections.

Type: 
Promise

url(opt_pathnameopt) → {string}

Formats a URL for this server.

Parameters:
NameTypeAttributesDescription
opt_pathnamestring<optional>

The desired pathname on the server.

Throws:

If the server is not running.

Type
Error
Returns:

The formatted URL.

Type: 
string

Type Definitions

Host

Type:
  • Object
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ServiceOptions.html b/docs/api/javascript/ServiceOptions.html index bbc452b6f3d80..26a20f97adcc8 100644 --- a/docs/api/javascript/ServiceOptions.html +++ b/docs/api/javascript/ServiceOptions.html @@ -1,3 +1,3 @@ Interface: ServiceOptions
On this page

ServiceOptions

A record object that defines the configuration options for a DriverService instance.

Members

(non-null) args :Array.<CommandLineFlag>|IThenable.<!Array.<CommandLineFlag>>

The arguments to pass to the service. If a promise is provided, the service will wait for it to resolve before starting.

Type:

env :Object.<string, string>|undefined

The environment variables that should be visible to the server process. Defaults to inheriting the current process's environment.

Type:
  • Object.<string, string> | undefined

hostname :string|undefined

The host name to access the server on. If this option is specified, the #loopback option will be ignored.

Type:
  • string | undefined

loopback :boolean|undefined

Whether the service should only be accessed on this host's loopback address.

Type:
  • boolean | undefined

path :string|undefined|null

The base path on the server for the WebDriver wire protocol (e.g. '/wd/hub'). Defaults to '/'.

Type:
  • string | undefined | null

port :number|!IThenable.<number>

The port to start the server on (must be > 0). If the port is provided as a promise, the service will wait for the promise to resolve before starting.

Type:
  • number | !IThenable.<number>

stdio :StdIoOptions|undefined

IO configuration for the spawned server process. For more information, refer to the documentation of child_process.spawn.

Type:
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ServiceOptions

A record object that defines the configuration options for a DriverService instance.

Members

(non-null) args :Array.<CommandLineFlag>|IThenable.<!Array.<CommandLineFlag>>

The arguments to pass to the service. If a promise is provided, the service will wait for it to resolve before starting.

Type:

env :Object.<string, string>|undefined

The environment variables that should be visible to the server process. Defaults to inheriting the current process's environment.

Type:
  • Object.<string, string> | undefined

hostname :string|undefined

The host name to access the server on. If this option is specified, the #loopback option will be ignored.

Type:
  • string | undefined

loopback :boolean|undefined

Whether the service should only be accessed on this host's loopback address.

Type:
  • boolean | undefined

path :string|undefined|null

The base path on the server for the WebDriver wire protocol (e.g. '/wd/hub'). Defaults to '/'.

Type:
  • string | undefined | null

port :number|!IThenable.<number>

The port to start the server on (must be > 0). If the port is provided as a promise, the service will wait for the promise to resolve before starting.

Type:
  • number | !IThenable.<number>

stdio :StdIoOptions|undefined

IO configuration for the spawned server process. For more information, refer to the documentation of child_process.spawn.

Type:
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Session.html b/docs/api/javascript/Session.html index 6d83323577837..8a1cecb941dc3 100644 --- a/docs/api/javascript/Session.html +++ b/docs/api/javascript/Session.html @@ -1,3 +1,3 @@ Class: Session
On this page

Session

Contains information about a single WebDriver session.

Constructor

new Session(id, capabilities)

Parameters:
NameTypeDescription
idstring

The session ID.

capabilities

Methods

getCapabilities() → (non-null) {Capabilities}

Returns:

This session's capabilities.

Type: 
Capabilities

getCapability(key) → {*}

Retrieves the value of a specific capability.

Parameters:
NameTypeDescription
keystring

The capability to retrieve.

Returns:

The capability value.

Type: 
*

getId() → {string}

Returns:

This session's ID.

Type: 
string

toJSON() → {string}

Returns the JSON representation of this object, which is just the string session ID.

Returns:

The JSON representation of this Session.

Type: 
string
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Session

Contains information about a single WebDriver session.

Constructor

new Session(id, capabilities)

Parameters:
NameTypeDescription
idstring

The session ID.

capabilities

Methods

getCapabilities() → (non-null) {Capabilities}

Returns:

This session's capabilities.

Type: 
Capabilities

getCapability(key) → {*}

Retrieves the value of a specific capability.

Parameters:
NameTypeDescription
keystring

The capability to retrieve.

Returns:

The capability value.

Type: 
*

getId() → {string}

Returns:

This session's ID.

Type: 
string

toJSON() → {string}

Returns the JSON representation of this object, which is just the string session ID.

Returns:

The JSON representation of this Session.

Type: 
string
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/SessionNotCreatedError.html b/docs/api/javascript/SessionNotCreatedError.html index b02bb546abf51..29537e21d5e0f 100644 --- a/docs/api/javascript/SessionNotCreatedError.html +++ b/docs/api/javascript/SessionNotCreatedError.html @@ -1,3 +1,3 @@ Class: SessionNotCreatedError
On this page

SessionNotCreatedError

A new session could not be created.

Constructor

new SessionNotCreatedError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

SessionNotCreatedError

A new session could not be created.

Constructor

new SessionNotCreatedError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ShadowRoot.html b/docs/api/javascript/ShadowRoot.html index fd1c702d8af79..6f6977b440131 100644 --- a/docs/api/javascript/ShadowRoot.html +++ b/docs/api/javascript/ShadowRoot.html @@ -1,6 +1,6 @@ Class: ShadowRoot
On this page

ShadowRoot

Represents a ShadowRoot of a WebElement. Provides functions to retrieve elements that live in the DOM below the ShadowRoot.

Constructor

new ShadowRoot()

Methods

findElement(locatornon-null) → (non-null) {WebElementPromise}

Schedule a command to find a descendant of this ShadowROot. If the element cannot be found, the returned promise will be rejected with a NoSuchElementError.

The search criteria for an element may be defined using one of the static factories on the by.By class, or as a short-hand ./by.ByHash object. For example, the following two statements are equivalent:

var e1 = shadowroot.findElement(By.id('foo'));
+    
On this page

ShadowRoot

Represents a ShadowRoot of a WebElement. Provides functions to retrieve elements that live in the DOM below the ShadowRoot.

Constructor

new ShadowRoot()

Methods

findElement(locatornon-null) → (non-null) {WebElementPromise}

Schedule a command to find a descendant of this ShadowROot. If the element cannot be found, the returned promise will be rejected with a NoSuchElementError.

The search criteria for an element may be defined using one of the static factories on the by.By class, or as a short-hand ./by.ByHash object. For example, the following two statements are equivalent:

var e1 = shadowroot.findElement(By.id('foo'));
 var e2 = shadowroot.findElement({id:'foo'});
 

You may also provide a custom locator function, which takes as input this instance and returns a WebElement, or a promise that will resolve to a WebElement. If the returned promise resolves to an array of WebElements, WebDriver will use the first element. For example, to find the first visible link on a page, you could write:

var link = element.findElement(firstVisibleLink);
 
@@ -10,4 +10,4 @@
     return link.isDisplayed();
   });
 }
-
Parameters:
NameTypeDescription
locatorby.By | function

The locator strategy to use when searching for the element.

Returns:

A WebElement that can be used to issue commands against the located element. If the element is not found, the element will be invalidated and all scheduled commands aborted.

Type: 
WebElementPromise

(async) findElements(locatornon-null) → (non-null) {Promise.<!Array.<!WebElement>>}

Locates all the descendants of this element that match the given search criteria.

Parameters:
NameTypeDescription
locatorby.By | function

The locator strategy to use when searching for the element.

Returns:

A promise that will resolve to an array of WebElements.

Type: 
Promise.<!Array.<!WebElement>>

(static) extractId(obj) → {string}

Extracts the encoded ShadowRoot ID from the object.

Parameters:
NameTypeDescription
obj?

The object to extract the ID from.

Throws:

if the object is not a valid encoded ID.

Type
TypeError
Returns:

the extracted ID.

Type: 
string

(static) isId(obj) → {boolean}

Parameters:
NameTypeDescription
obj?

the object to test.

Returns:

whether the object is a valid encoded WebElement ID.

Type: 
boolean
Selenium WebDriver JavaScript API
\ No newline at end of file +
Parameters:
NameTypeDescription
locatorby.By | function

The locator strategy to use when searching for the element.

Returns:

A WebElement that can be used to issue commands against the located element. If the element is not found, the element will be invalidated and all scheduled commands aborted.

Type: 
WebElementPromise

(async) findElements(locatornon-null) → (non-null) {Promise.<!Array.<!WebElement>>}

Locates all the descendants of this element that match the given search criteria.

Parameters:
NameTypeDescription
locatorby.By | function

The locator strategy to use when searching for the element.

Returns:

A promise that will resolve to an array of WebElements.

Type: 
Promise.<!Array.<!WebElement>>

(static) extractId(obj) → {string}

Extracts the encoded ShadowRoot ID from the object.

Parameters:
NameTypeDescription
obj?

The object to extract the ID from.

Throws:

if the object is not a valid encoded ID.

Type
TypeError
Returns:

the extracted ID.

Type: 
string

(static) isId(obj) → {boolean}

Parameters:
NameTypeDescription
obj?

the object to test.

Returns:

whether the object is a valid encoded WebElement ID.

Type: 
boolean
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ShadowRootPromise.html b/docs/api/javascript/ShadowRootPromise.html index 5a07193f54706..258afd3bd799b 100644 --- a/docs/api/javascript/ShadowRootPromise.html +++ b/docs/api/javascript/ShadowRootPromise.html @@ -1,3 +1,3 @@ Class: ShadowRootPromise
On this page

ShadowRootPromise

ShadowRootPromise is a promise that will be fulfilled with a WebElement. This serves as a forward proxy on ShadowRoot, allowing calls to be scheduled without directly on this instance before the underlying ShadowRoot has been fulfilled.

Constructor

new ShadowRootPromise(drivernon-null, shadownon-null)

Parameters:
NameTypeDescription
driverWebDriver

The parent WebDriver instance for this element.

shadowPromise.<!ShadowRoot>

A promise that will resolve to the promised element.

Implements

Members

catch

then

Methods

getId()

Defers returning the ShadowRoot ID until the wrapped WebElement has been resolved.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ShadowRootPromise

ShadowRootPromise is a promise that will be fulfilled with a WebElement. This serves as a forward proxy on ShadowRoot, allowing calls to be scheduled without directly on this instance before the underlying ShadowRoot has been fulfilled.

Constructor

new ShadowRootPromise(drivernon-null, shadownon-null)

Parameters:
NameTypeDescription
driverWebDriver

The parent WebDriver instance for this element.

shadowPromise.<!ShadowRoot>

A promise that will resolve to the promised element.

Implements

Members

catch

then

Methods

getId()

Defers returning the ShadowRoot ID until the wrapped WebElement has been resolved.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Source.html b/docs/api/javascript/Source.html index 98da7da424f59..a806d3b7a3cce 100644 --- a/docs/api/javascript/Source.html +++ b/docs/api/javascript/Source.html @@ -1,3 +1,3 @@ Class: Source
On this page

Source

Represents a source object. Described in https://w3c.github.io/webdriver-bidi/#type-script-Source.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Source

Represents a source object. Described in https://w3c.github.io/webdriver-bidi/#type-script-Source.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/StaleElementReferenceError.html b/docs/api/javascript/StaleElementReferenceError.html index 750be7204e820..98d7f8ec5d9d9 100644 --- a/docs/api/javascript/StaleElementReferenceError.html +++ b/docs/api/javascript/StaleElementReferenceError.html @@ -1,3 +1,3 @@ Class: StaleElementReferenceError
On this page

StaleElementReferenceError

An element command failed because the referenced element is no longer attached to the DOM.

Constructor

new StaleElementReferenceError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

StaleElementReferenceError

An element command failed because the referenced element is no longer attached to the DOM.

Constructor

new StaleElementReferenceError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Storage.html b/docs/api/javascript/Storage.html index c45a00b9355f1..00adfb8097f28 100644 --- a/docs/api/javascript/Storage.html +++ b/docs/api/javascript/Storage.html @@ -1,3 +1,3 @@ Class: Storage
On this page

Storage

Represents commands of Storage module. Described in https://w3c.github.io/webdriver-bidi/#module-storage.

Constructor

new Storage()

Methods

(async) deleteCookies(cookieFilteropt, partitionopt) → {PartitionKey}

Deletes cookies based on the provided filter and partition.

Parameters:
NameTypeAttributesDescription
cookieFilterCookieFilter<optional>

The filter to apply to the cookies. Must be an instance of CookieFilter.

partitionBrowsingContextPartitionDescriptor | StorageKeyPartitionDescriptor<optional>

The partition to delete cookies from. Must be an instance of either BrowsingContextPartitionDescriptor or StorageKeyPartitionDescriptor.

Throws:
  • If the provided parameters are not of the correct type.
Type
Error
Returns:
  • The partition key of the deleted cookies, if available.
Type: 
PartitionKey

(async) getCookies(filteropt, partitionopt)

Retrieves cookies based on the provided filter and partition.

Parameters:
NameTypeAttributesDescription
filterCookieFilter<optional>

The filter to apply to the cookies.

partitionBrowsingContextPartitionDescriptor | StorageKeyPartitionDescriptor<optional>

The partition to retrieve cookies from.

Throws:
  • If the filter parameter is provided but is not an instance of CookieFilter.

    Type
    Error
  • If the partition parameter is provided but is not an instance of BrowsingContextPartitionDescriptor or StorageKeyPartitionDescriptor.

    Type
    Error
Returns:

(async) setCookie(cookie, partitionopt) → {PartitionKey}

Sets a cookie using the provided cookie object and partition.

Parameters:
NameTypeAttributesDescription
cookiePartialCookie

The cookie object to set.

partitionBrowsingContextPartitionDescriptor | StorageKeyPartitionDescriptor<optional>

The partition to use for the cookie.

Throws:

If the cookie parameter is not an instance of PartialCookie or if the partition parameter is not an instance of PartitionDescriptor.

Type
Error
Returns:

The partition key of the set cookie.

Type: 
PartitionKey
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Storage

Represents commands of Storage module. Described in https://w3c.github.io/webdriver-bidi/#module-storage.

Constructor

new Storage()

Methods

(async) deleteCookies(cookieFilteropt, partitionopt) → {PartitionKey}

Deletes cookies based on the provided filter and partition.

Parameters:
NameTypeAttributesDescription
cookieFilterCookieFilter<optional>

The filter to apply to the cookies. Must be an instance of CookieFilter.

partitionBrowsingContextPartitionDescriptor | StorageKeyPartitionDescriptor<optional>

The partition to delete cookies from. Must be an instance of either BrowsingContextPartitionDescriptor or StorageKeyPartitionDescriptor.

Throws:
  • If the provided parameters are not of the correct type.
Type
Error
Returns:
  • The partition key of the deleted cookies, if available.
Type: 
PartitionKey

(async) getCookies(filteropt, partitionopt)

Retrieves cookies based on the provided filter and partition.

Parameters:
NameTypeAttributesDescription
filterCookieFilter<optional>

The filter to apply to the cookies.

partitionBrowsingContextPartitionDescriptor | StorageKeyPartitionDescriptor<optional>

The partition to retrieve cookies from.

Throws:
  • If the filter parameter is provided but is not an instance of CookieFilter.

    Type
    Error
  • If the partition parameter is provided but is not an instance of BrowsingContextPartitionDescriptor or StorageKeyPartitionDescriptor.

    Type
    Error
Returns:

(async) setCookie(cookie, partitionopt) → {PartitionKey}

Sets a cookie using the provided cookie object and partition.

Parameters:
NameTypeAttributesDescription
cookiePartialCookie

The cookie object to set.

partitionBrowsingContextPartitionDescriptor | StorageKeyPartitionDescriptor<optional>

The partition to use for the cookie.

Throws:

If the cookie parameter is not an instance of PartialCookie or if the partition parameter is not an instance of PartitionDescriptor.

Type
Error
Returns:

The partition key of the set cookie.

Type: 
PartitionKey
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/StorageKeyPartitionDescriptor.html b/docs/api/javascript/StorageKeyPartitionDescriptor.html index cfb46f43b3bca..7a174db7ab0c4 100644 --- a/docs/api/javascript/StorageKeyPartitionDescriptor.html +++ b/docs/api/javascript/StorageKeyPartitionDescriptor.html @@ -1,3 +1,3 @@ Class: StorageKeyPartitionDescriptor
On this page

StorageKeyPartitionDescriptor

Represents a partition descriptor for storage key.

Constructor

new StorageKeyPartitionDescriptor()

Extends

Methods

sourceOrigin(sourceOrigin) → {PartitionDescriptor}

Sets the source origin for the partition descriptor.

Parameters:
NameTypeDescription
sourceOriginstring

The source origin to set.

Returns:
  • The updated PartitionDescriptor instance for chaining.
Type: 
PartitionDescriptor

userContext(userContext) → {PartitionDescriptor}

Sets the user context for the partition descriptor.

Parameters:
NameTypeDescription
userContextany

The user context to set.

Returns:
  • The updated partition descriptor instance for chaining.
Type: 
PartitionDescriptor
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

StorageKeyPartitionDescriptor

Represents a partition descriptor for storage key.

Constructor

new StorageKeyPartitionDescriptor()

Extends

Methods

sourceOrigin(sourceOrigin) → {PartitionDescriptor}

Sets the source origin for the partition descriptor.

Parameters:
NameTypeDescription
sourceOriginstring

The source origin to set.

Returns:
  • The updated PartitionDescriptor instance for chaining.
Type: 
PartitionDescriptor

userContext(userContext) → {PartitionDescriptor}

Sets the user context for the partition descriptor.

Parameters:
NameTypeDescription
userContextany

The user context to set.

Returns:
  • The updated partition descriptor instance for chaining.
Type: 
PartitionDescriptor
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/SuiteOptions.html b/docs/api/javascript/SuiteOptions.html index eb2539378661b..d2317dac36554 100644 --- a/docs/api/javascript/SuiteOptions.html +++ b/docs/api/javascript/SuiteOptions.html @@ -1,3 +1,3 @@ Interface: SuiteOptions
On this page

SuiteOptions

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

SuiteOptions

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/TargetBrowser.html b/docs/api/javascript/TargetBrowser.html index 4c2296a336957..66ace928c3f7d 100644 --- a/docs/api/javascript/TargetBrowser.html +++ b/docs/api/javascript/TargetBrowser.html @@ -1,3 +1,3 @@ Interface: TargetBrowser
On this page

TargetBrowser

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

TargetBrowser

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ThenableWebDriver.html b/docs/api/javascript/ThenableWebDriver.html index 614f5b4d3012c..7d4ca0f794e2c 100644 --- a/docs/api/javascript/ThenableWebDriver.html +++ b/docs/api/javascript/ThenableWebDriver.html @@ -1,6 +1,6 @@ Interface: ThenableWebDriver
On this page

ThenableWebDriver

A thenable wrapper around a IWebDriver instance that allows commands to be issued directly instead of having to repeatedly call then:

let driver = new Builder().build();
+    
On this page

ThenableWebDriver

A thenable wrapper around a IWebDriver instance that allows commands to be issued directly instead of having to repeatedly call then:

let driver = new Builder().build();
 driver.then(d => d.get(url));  // You can do this...
 driver.get(url);               // ...or this
-

If the driver instance fails to resolve (e.g. the session cannot be created), every issued command will fail.

Extends

  • webdriver.IWebDriver
  • IThenable.<!webdriver.IWebDriver>

Methods

(static) createSession(…args)

Parameters:
NameTypeAttributesDescription
args?<repeatable>
Selenium WebDriver JavaScript API
\ No newline at end of file +

If the driver instance fails to resolve (e.g. the session cannot be created), every issued command will fail.

Extends

  • webdriver.IWebDriver
  • IThenable.<!webdriver.IWebDriver>

Methods

(static) createSession(…args)

Parameters:
NameTypeAttributesDescription
args?<repeatable>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/TimeoutError.html b/docs/api/javascript/TimeoutError.html index 56e228eeb9fa3..06cd1127190bd 100644 --- a/docs/api/javascript/TimeoutError.html +++ b/docs/api/javascript/TimeoutError.html @@ -1,3 +1,3 @@ Class: TimeoutError
On this page

TimeoutError

An operation did not complete before its timeout expired.

Constructor

new TimeoutError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

TimeoutError

An operation did not complete before its timeout expired.

Constructor

new TimeoutError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Timeouts.html b/docs/api/javascript/Timeouts.html index d0f0bcf407afa..e6103c80ef7c2 100644 --- a/docs/api/javascript/Timeouts.html +++ b/docs/api/javascript/Timeouts.html @@ -1,3 +1,3 @@ Interface: Timeouts
On this page

Timeouts

Record object defining the timeouts that apply to certain WebDriver actions.

Members

implicit :number

The maximum amount of time, in milliseconds, to spend attempting to locate an element on the current page.

Type:
  • number

pageLoad :number

The timeout, in milliseconds, to apply to navigation events along with the PageLoadStrategy.

Type:
  • number

script :number

Defines when, in milliseconds, to interrupt a script that is being evaluated.

Type:
  • number
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Timeouts

Record object defining the timeouts that apply to certain WebDriver actions.

Members

implicit :number

The maximum amount of time, in milliseconds, to spend attempting to locate an element on the current page.

Type:
  • number

pageLoad :number

The timeout, in milliseconds, to apply to navigation events along with the PageLoadStrategy.

Type:
  • number

script :number

Defines when, in milliseconds, to interrupt a script that is being evaluated.

Type:
  • number
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/UnableToCaptureScreenError.html b/docs/api/javascript/UnableToCaptureScreenError.html index 4e7fce186f3f2..ef828621fd03b 100644 --- a/docs/api/javascript/UnableToCaptureScreenError.html +++ b/docs/api/javascript/UnableToCaptureScreenError.html @@ -1,3 +1,3 @@ Class: UnableToCaptureScreenError
On this page

UnableToCaptureScreenError

A screen capture operation was not possible.

Constructor

new UnableToCaptureScreenError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

UnableToCaptureScreenError

A screen capture operation was not possible.

Constructor

new UnableToCaptureScreenError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/UnableToSetCookieError.html b/docs/api/javascript/UnableToSetCookieError.html index 86ea330d4678e..0d6c148d15e29 100644 --- a/docs/api/javascript/UnableToSetCookieError.html +++ b/docs/api/javascript/UnableToSetCookieError.html @@ -1,3 +1,3 @@ Class: UnableToSetCookieError
On this page

UnableToSetCookieError

A request to set a cookie’s value could not be satisfied.

Constructor

new UnableToSetCookieError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

UnableToSetCookieError

A request to set a cookie’s value could not be satisfied.

Constructor

new UnableToSetCookieError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/UnexpectedAlertOpenError.html b/docs/api/javascript/UnexpectedAlertOpenError.html index 524c11e09e31c..a151f55f7a052 100644 --- a/docs/api/javascript/UnexpectedAlertOpenError.html +++ b/docs/api/javascript/UnexpectedAlertOpenError.html @@ -1,3 +1,3 @@ Class: UnexpectedAlertOpenError
On this page

UnexpectedAlertOpenError

A modal dialog was open, blocking this operation.

Constructor

new UnexpectedAlertOpenError(opt_erroropt, opt_textopt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

opt_textstring<optional>

the text of the open dialog, if available.

Methods

getAlertText() → {string|undefined}

Returns:

The text displayed with the unhandled alert, if available.

Type: 
string | undefined
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

UnexpectedAlertOpenError

A modal dialog was open, blocking this operation.

Constructor

new UnexpectedAlertOpenError(opt_erroropt, opt_textopt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

opt_textstring<optional>

the text of the open dialog, if available.

Methods

getAlertText() → {string|undefined}

Returns:

The text displayed with the unhandled alert, if available.

Type: 
string | undefined
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/UnknownCommandError.html b/docs/api/javascript/UnknownCommandError.html index 7bff24dd29927..55097f5c02555 100644 --- a/docs/api/javascript/UnknownCommandError.html +++ b/docs/api/javascript/UnknownCommandError.html @@ -1,3 +1,3 @@ Class: UnknownCommandError
On this page

UnknownCommandError

A command could not be executed because the remote end is not aware of it.

Constructor

new UnknownCommandError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

UnknownCommandError

A command could not be executed because the remote end is not aware of it.

Constructor

new UnknownCommandError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/UnknownMethodError.html b/docs/api/javascript/UnknownMethodError.html index 673e66fe88442..94b2c1ca444f4 100644 --- a/docs/api/javascript/UnknownMethodError.html +++ b/docs/api/javascript/UnknownMethodError.html @@ -1,3 +1,3 @@ Class: UnknownMethodError
On this page

UnknownMethodError

The requested command matched a known URL but did not match an method for that URL.

Constructor

new UnknownMethodError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

UnknownMethodError

The requested command matched a known URL but did not match an method for that URL.

Constructor

new UnknownMethodError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/UnsupportedOperationError.html b/docs/api/javascript/UnsupportedOperationError.html index 98ba8088d8e06..14f09162b3504 100644 --- a/docs/api/javascript/UnsupportedOperationError.html +++ b/docs/api/javascript/UnsupportedOperationError.html @@ -1,3 +1,3 @@ Class: UnsupportedOperationError
On this page

UnsupportedOperationError

Reports an unsupported operation.

Constructor

new UnsupportedOperationError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

UnsupportedOperationError

Reports an unsupported operation.

Constructor

new UnsupportedOperationError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/UrlPattern.html b/docs/api/javascript/UrlPattern.html index 70295f82cf4fe..90eef5c1933f5 100644 --- a/docs/api/javascript/UrlPattern.html +++ b/docs/api/javascript/UrlPattern.html @@ -1,3 +1,3 @@ Class: UrlPattern
On this page

UrlPattern

Represents a URL pattern to intercept. Described in network.UrlPatternPattern https://w3c.github.io/webdriver-bidi/#type-network-UrlPattern

Constructor

new UrlPattern()

Methods

hostname(hostname) → {UrlPattern}

Sets the hostname for the URL pattern.

Parameters:
NameTypeDescription
hostnamestring

The hostname to set.

Returns:
  • Returns the updated instance of the URL pattern for chaining.
Type: 
UrlPattern

pathname(pathname) → {UrlPattern}

Sets the pathname for the URL pattern.

Parameters:
NameTypeDescription
pathnamestring

The pathname to set.

Returns:
  • Returns the updated instance of the URL pattern for chaining.
Type: 
UrlPattern

port(port) → {UrlPattern}

Sets the port for the URL pattern.

Parameters:
NameTypeDescription
portnumber

The port number to set.

Throws:
  • Throws an error if the port is not a number.
Type
Error
Returns:
  • Returns the updated instance of the URL pattern for chaining.
Type: 
UrlPattern

protocol(protocol) → {UrlPattern}

Sets the protocol for the URL pattern.

Parameters:
NameTypeDescription
protocolstring

The protocol to set.

Returns:
  • Returns the updated instance of the URL pattern for chaining.
Type: 
UrlPattern

Sets the search parameter in the URL pattern.

Parameters:
NameTypeDescription
searchstring

The search parameter to be set.

Returns:
  • Returns the updated instance of the URL pattern for chaining.
Type: 
UrlPattern
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

UrlPattern

Represents a URL pattern to intercept. Described in network.UrlPatternPattern https://w3c.github.io/webdriver-bidi/#type-network-UrlPattern

Constructor

new UrlPattern()

Methods

hostname(hostname) → {UrlPattern}

Sets the hostname for the URL pattern.

Parameters:
NameTypeDescription
hostnamestring

The hostname to set.

Returns:
  • Returns the updated instance of the URL pattern for chaining.
Type: 
UrlPattern

pathname(pathname) → {UrlPattern}

Sets the pathname for the URL pattern.

Parameters:
NameTypeDescription
pathnamestring

The pathname to set.

Returns:
  • Returns the updated instance of the URL pattern for chaining.
Type: 
UrlPattern

port(port) → {UrlPattern}

Sets the port for the URL pattern.

Parameters:
NameTypeDescription
portnumber

The port number to set.

Throws:
  • Throws an error if the port is not a number.
Type
Error
Returns:
  • Returns the updated instance of the URL pattern for chaining.
Type: 
UrlPattern

protocol(protocol) → {UrlPattern}

Sets the protocol for the URL pattern.

Parameters:
NameTypeDescription
protocolstring

The protocol to set.

Returns:
  • Returns the updated instance of the URL pattern for chaining.
Type: 
UrlPattern

Sets the search parameter in the URL pattern.

Parameters:
NameTypeDescription
searchstring

The search parameter to be set.

Returns:
  • Returns the updated instance of the URL pattern for chaining.
Type: 
UrlPattern
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/VirtualAuthenticatorOptions.html b/docs/api/javascript/VirtualAuthenticatorOptions.html index 9198696ab68f2..1578faf73dd21 100644 --- a/docs/api/javascript/VirtualAuthenticatorOptions.html +++ b/docs/api/javascript/VirtualAuthenticatorOptions.html @@ -1,3 +1,3 @@ Class: VirtualAuthenticatorOptions
On this page

VirtualAuthenticatorOptions

Options for the creation of virtual authenticators.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

VirtualAuthenticatorOptions

Options for the creation of virtual authenticators.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/WebDriver.html b/docs/api/javascript/WebDriver.html index 5d1bf35cc7cb0..3123141085a3f 100644 --- a/docs/api/javascript/WebDriver.html +++ b/docs/api/javascript/WebDriver.html @@ -1,6 +1,6 @@ Class: WebDriver
On this page

WebDriver

Each WebDriver instance provides automated control over a browser session.

Constructor

new WebDriver(session, executornon-null, onQuitopt)

Parameters:
NameTypeAttributesDescription
session
executorcommand.Executor

The executor to use when sending commands to the browser.

onQuitfunction<optional>

A function to call, if any, when the session is terminated.

Implements

Methods

actions(optionsopt) → (non-null) {input.Actions}

Creates a new action sequence using this driver. The sequence will not be submitted for execution until Actions.perform() is called.

Parameters:
NameTypeAttributesDescription
optionsObject<optional>

Configuration options for the action sequence (see Actions documentation for details).

Returns:

A new action sequence for this instance.

Type: 
input.Actions

(async) addCredential(credential)

Injects a credential into the authenticator.

Parameters:
NameTypeDescription
credential

Credential to be added

(async) addVirtualAuthenticator(options)

Adds a virtual authenticator with the given options.

Parameters:
NameTypeDescription
options

VirtualAuthenticatorOptions object to set authenticator options.

close() → (non-null) {Promise.<void>}

Closes the current window.

Returns:

A promise that will be resolved when this command has completed.

Type: 
Promise.<void>

(async) createCDPConnection() → (non-null) {Promise.<resolved>}

Creates a new WebSocket connection.

Returns:

A new CDP instance.

Type: 
Promise.<resolved>

(async) execute(commandnon-null) → (non-null) {Promise.<T>}

Executes the provided command.Command using this driver's command.Executor.

Parameters:
NameTypeDescription
commandcommand.Command

The command to schedule.

Returns:

A promise that will be resolved with the command result.

Type: 
Promise.<T>

executeAsyncScript(scriptnon-null, …args) → (non-null) {IThenable.<T>}

Executes a snippet of asynchronous JavaScript in the context of the currently selected frame or window. The script fragment will be executed as the body of an anonymous function. If the script is provided as a function object, that function will be converted to a string for injection into the target window.

Any arguments provided in addition to the script will be included as script arguments and may be referenced using the arguments object. Arguments may be a boolean, number, string, or WebElement. Arrays and objects may also be used as script arguments as long as each item adheres to the types previously mentioned.

Unlike executing synchronous JavaScript with #executeScript, scripts executed with this function must explicitly signal they are finished by invoking the provided callback. This callback will always be injected into the executed function as the last argument, and thus may be referenced with arguments[arguments.length - 1]. The following steps will be taken for resolving this functions return value against the first argument to the script's callback function:

  • For a HTML element, the value will resolve to a WebElement
  • Null and undefined return values will resolve to null
  • Booleans, numbers, and strings will resolve as is
  • Functions will resolve to their string representation
  • For arrays and objects, each member item will be converted according to the rules above

Example #1: Performing a sleep that is synchronized with the currently selected window:

var start = new Date().getTime();
+    
On this page

WebDriver

Each WebDriver instance provides automated control over a browser session.

Constructor

new WebDriver(session, executornon-null, onQuitopt)

Parameters:
NameTypeAttributesDescription
session
executorcommand.Executor

The executor to use when sending commands to the browser.

onQuitfunction<optional>

A function to call, if any, when the session is terminated.

Implements

Methods

actions(optionsopt) → (non-null) {input.Actions}

Creates a new action sequence using this driver. The sequence will not be submitted for execution until Actions.perform() is called.

Parameters:
NameTypeAttributesDescription
optionsObject<optional>

Configuration options for the action sequence (see Actions documentation for details).

Returns:

A new action sequence for this instance.

Type: 
input.Actions

(async) addCredential(credential)

Injects a credential into the authenticator.

Parameters:
NameTypeDescription
credential

Credential to be added

(async) addVirtualAuthenticator(options)

Adds a virtual authenticator with the given options.

Parameters:
NameTypeDescription
options

VirtualAuthenticatorOptions object to set authenticator options.

close() → (non-null) {Promise.<void>}

Closes the current window.

Returns:

A promise that will be resolved when this command has completed.

Type: 
Promise.<void>

(async) createCDPConnection() → (non-null) {Promise.<resolved>}

Creates a new WebSocket connection.

Returns:

A new CDP instance.

Type: 
Promise.<resolved>

(async) execute(commandnon-null) → (non-null) {Promise.<T>}

Executes the provided command.Command using this driver's command.Executor.

Parameters:
NameTypeDescription
commandcommand.Command

The command to schedule.

Returns:

A promise that will be resolved with the command result.

Type: 
Promise.<T>

executeAsyncScript(scriptnon-null, …args) → (non-null) {IThenable.<T>}

Executes a snippet of asynchronous JavaScript in the context of the currently selected frame or window. The script fragment will be executed as the body of an anonymous function. If the script is provided as a function object, that function will be converted to a string for injection into the target window.

Any arguments provided in addition to the script will be included as script arguments and may be referenced using the arguments object. Arguments may be a boolean, number, string, or WebElement. Arrays and objects may also be used as script arguments as long as each item adheres to the types previously mentioned.

Unlike executing synchronous JavaScript with #executeScript, scripts executed with this function must explicitly signal they are finished by invoking the provided callback. This callback will always be injected into the executed function as the last argument, and thus may be referenced with arguments[arguments.length - 1]. The following steps will be taken for resolving this functions return value against the first argument to the script's callback function:

  • For a HTML element, the value will resolve to a WebElement
  • Null and undefined return values will resolve to null
  • Booleans, numbers, and strings will resolve as is
  • Functions will resolve to their string representation
  • For arrays and objects, each member item will be converted according to the rules above

Example #1: Performing a sleep that is synchronized with the currently selected window:

var start = new Date().getTime();
 driver.executeAsyncScript(
     'window.setTimeout(arguments[arguments.length - 1], 500);').
     then(function() {
@@ -39,7 +39,7 @@
     return link.isDisplayed();
   });
 }
-
Parameters:
NameTypeDescription
locatorby.By | function

The locator to use.

Returns:

A WebElement that can be used to issue commands against the located element. If the element is not found, the element will be invalidated and all scheduled commands aborted.

Type: 
WebElementPromise

(async) findElements(locatornon-null) → (non-null) {Promise.<!Array.<!WebElement>>}

Search for multiple elements on the page. Refer to the documentation on #findElement(by) for information on element locator strategies.

Parameters:
NameTypeDescription
locatorby.By | function

The locator to use.

Returns:

A promise that will resolve to an array of WebElements.

Type: 
Promise.<!Array.<!WebElement>>

get(url) → (non-null) {Promise.<void>}

Navigates to the given URL.

Parameters:
NameTypeDescription
urlstring

The fully qualified URL to open.

Implements
Returns:

A promise that will be resolved when the document has finished loading.

Type: 
Promise.<void>

getAllWindowHandles() → (non-null) {Promise.<!Array.<string>>}

Retrieves a list of all available window handles.

Returns:

A promise that will be resolved with an array of window handles.

Type: 
Promise.<!Array.<string>>

(async) getBidi() → {BIDI}

Initiates bidi connection using 'webSocketUrl'

Returns:
Type: 
BIDI

getCapabilities() → (non-null) {Promise.<!Capabilities>}

Returns:

A promise that will resolve with the instance's capabilities.

Type: 
Promise.<!Capabilities>

(async) getCredentials()

Returns:

The list of credentials owned by the authenticator.

getCurrentUrl() → (non-null) {Promise.<string>}

Retrieves the URL for the current page.

Returns:

A promise that will be resolved with the current URL.

Type: 
Promise.<string>

getExecutor() → (non-null) {command.Executor}

Returns:

The command executor used by this instance.

Type: 
command.Executor

getPageSource() → (non-null) {Promise.<string>}

Retrieves the current page's source. The returned source is a representation of the underlying DOM: do not expect it to be formatted or escaped in the same way as the raw response sent from the web server.

Returns:

A promise that will be resolved with the current page source.

Type: 
Promise.<string>

getSession() → (non-null) {Promise.<!Session>}

Returns:

A promise for this client's session.

Type: 
Promise.<!Session>

getTitle() → (non-null) {Promise.<string>}

Retrieves the current page title.

Returns:

A promise that will be resolved with the current page's title.

Type: 
Promise.<string>

getWindowHandle() → (non-null) {Promise.<string>}

Retrieves the current window handle.

Returns:

A promise that will be resolved with the current window handle.

Type: 
Promise.<string>

(async) getWsUrl(debuggerAddress, target, caps) → {string}

Retrieves 'webSocketDebuggerUrl' by sending a http request using debugger address

Parameters:
NameTypeDescription
debuggerAddressstring
target
caps
Returns:

Returns parsed webSocketDebuggerUrl obtained from the http request

Type: 
string

(async) logMutationEvents(connection, callback) → {Promise.<void>}

Parameters:
NameTypeDescription
connection
callback
Returns:
Type: 
Promise.<void>

manage() → (non-null) {Options}

Returns:

The options interface for this instance.

Type: 
Options
Returns:

The navigation interface for this instance.

Type: 
Navigation

(async) normalize_(webElementPromisenon-null) → (non-null) {Promise.<!WebElement>}

Parameters:
NameTypeDescription
webElementPromisefunction

The webElement in unresolved state

Returns:

First single WebElement from array of resolved promises

Type: 
Promise.<!WebElement>

(async) onIntercept(connection, httpResponse, callback)

Handle Network interception requests

Parameters:
NameTypeDescription
connection

WebSocket connection to the browser

httpResponse

Object representing what we are intercepting as well as what should be returned.

callback

callback called when we intercept requests.

(async) onLogEvent(connection, callback) → {Promise.<void>}

Parameters:
NameTypeDescription
connection
callback
Returns:
Type: 
Promise.<void>

(async) onLogException(connection, callback) → {Promise.<void>}

Parameters:
NameTypeDescription
connection
callback
Returns:
Type: 
Promise.<void>

printPage(options)

Takes a PDF of the current page. The driver makes a best effort to return a PDF based on the provided parameters.

Parameters:
NameTypeDescription
optionsObject

quit() → (non-null) {Promise.<void>}

Terminates the browser session. After calling quit, this instance will be invalidated and may no longer be used to issue commands against the browser.

Implements
Returns:

A promise that will be resolved when the command has completed.

Type: 
Promise.<void>

(async) register(username, password, connection)

Sets a listener for Fetch.authRequired event from CDP If event is triggered, it enters username and password and allows the test to move forward

Parameters:
NameTypeDescription
usernamestring
passwordstring
connection

CDP Connection

(async) removeAllCredentials()

Removes all the credentials from the authenticator.

(async) removeCredential(credential_id)

Removes a credential from the authenticator.

Parameters:
NameTypeDescription
credential_id

The ID of the credential to be removed.

(async) removeVirtualAuthenticator()

Removes a previously added virtual authenticator. The authenticator is no longer valid after removal, so no methods may be called.

setFileDetector(detector)

Sets the file detector that should be used with this instance.

Parameters:
NameTypeDescription
detectorinput.FileDetector

The detector to use or null.

(async) setUserVerified(verified)

Sets whether the authenticator will simulate success or fail on user verification.

Parameters:
NameTypeDescription
verified

true if the authenticator will pass user verification, false otherwise.

sleep(ms) → (non-null) {Promise.<void>}

Makes the driver sleep for the given amount of time.

Parameters:
NameTypeDescription
msnumber

The amount of time, in milliseconds, to sleep.

Returns:

A promise that will be resolved when the sleep has finished.

Type: 
Promise.<void>

switchTo() → (non-null) {TargetLocator}

Returns:

The target locator interface for this instance.

Type: 
TargetLocator

takeScreenshot() → (non-null) {Promise.<string>}

Takes a screenshot of the current page. The driver makes the best effort to return a screenshot of the following, in order of preference:

  1. Entire page
  2. Current window
  3. Visible portion of the current frame
  4. The entire display containing the browser
Returns:

A promise that will be resolved to the screenshot as a base-64 encoded PNG.

Type: 
Promise.<string>

virtualAuthenticatorId()

Returns:

The value of authenticator ID added

wait(conditionnon-null, timeoutopt, messageopt, pollTimeoutopt) → (non-null) {IThenable.<T>|WebElementPromise}

Waits for a condition to evaluate to a "truthy" value. The condition may be specified by a Condition, as a custom function, or as any promise-like thenable.

For a Condition or function, the wait will repeatedly evaluate the condition until it returns a truthy value. If any errors occur while evaluating the condition, they will be allowed to propagate. In the event a condition returns a Promise, the polling loop will wait for it to be resolved and use the resolved value for whether the condition has been satisfied. The resolution time for a promise is always factored into whether a wait has timed out.

If the provided condition is a WebElementCondition, then the wait will return a WebElementPromise that will resolve to the element that satisfied the condition.

Example: waiting up to 10 seconds for an element to be present on the page.

async function example() {
+
Parameters:
NameTypeDescription
locatorby.By | function

The locator to use.

Returns:

A WebElement that can be used to issue commands against the located element. If the element is not found, the element will be invalidated and all scheduled commands aborted.

Type: 
WebElementPromise

(async) findElements(locatornon-null) → (non-null) {Promise.<!Array.<!WebElement>>}

Search for multiple elements on the page. Refer to the documentation on #findElement(by) for information on element locator strategies.

Parameters:
NameTypeDescription
locatorby.By | function

The locator to use.

Returns:

A promise that will resolve to an array of WebElements.

Type: 
Promise.<!Array.<!WebElement>>

get(url) → (non-null) {Promise.<void>}

Navigates to the given URL.

Parameters:
NameTypeDescription
urlstring

The fully qualified URL to open.

Implements
Returns:

A promise that will be resolved when the document has finished loading.

Type: 
Promise.<void>

getAllWindowHandles() → (non-null) {Promise.<!Array.<string>>}

Retrieves a list of all available window handles.

Returns:

A promise that will be resolved with an array of window handles.

Type: 
Promise.<!Array.<string>>

(async) getBidi() → {BIDI}

Initiates bidi connection using 'webSocketUrl'

Returns:
Type: 
BIDI

getCapabilities() → (non-null) {Promise.<!Capabilities>}

Returns:

A promise that will resolve with the instance's capabilities.

Type: 
Promise.<!Capabilities>

(async) getCredentials()

Returns:

The list of credentials owned by the authenticator.

getCurrentUrl() → (non-null) {Promise.<string>}

Retrieves the URL for the current page.

Returns:

A promise that will be resolved with the current URL.

Type: 
Promise.<string>

getExecutor() → (non-null) {command.Executor}

Returns:

The command executor used by this instance.

Type: 
command.Executor

getPageSource() → (non-null) {Promise.<string>}

Retrieves the current page's source. The returned source is a representation of the underlying DOM: do not expect it to be formatted or escaped in the same way as the raw response sent from the web server.

Returns:

A promise that will be resolved with the current page source.

Type: 
Promise.<string>

getSession() → (non-null) {Promise.<!Session>}

Returns:

A promise for this client's session.

Type: 
Promise.<!Session>

getTitle() → (non-null) {Promise.<string>}

Retrieves the current page title.

Returns:

A promise that will be resolved with the current page's title.

Type: 
Promise.<string>

getWindowHandle() → (non-null) {Promise.<string>}

Retrieves the current window handle.

Returns:

A promise that will be resolved with the current window handle.

Type: 
Promise.<string>

(async) getWsUrl(debuggerAddress, target, caps) → {string}

Retrieves 'webSocketDebuggerUrl' by sending a http request using debugger address

Parameters:
NameTypeDescription
debuggerAddressstring
target
caps
Returns:

Returns parsed webSocketDebuggerUrl obtained from the http request

Type: 
string

(async) logMutationEvents(connection, callback) → {Promise.<void>}

Parameters:
NameTypeDescription
connection
callback
Returns:
Type: 
Promise.<void>

manage() → (non-null) {Options}

Returns:

The options interface for this instance.

Type: 
Options
Returns:

The navigation interface for this instance.

Type: 
Navigation

(async) normalize_(webElementPromisenon-null) → (non-null) {Promise.<!WebElement>}

Parameters:
NameTypeDescription
webElementPromisefunction

The webElement in unresolved state

Returns:

First single WebElement from array of resolved promises

Type: 
Promise.<!WebElement>

(async) onIntercept(connection, httpResponse, callback)

Handle Network interception requests

Parameters:
NameTypeDescription
connection

WebSocket connection to the browser

httpResponse

Object representing what we are intercepting as well as what should be returned.

callback

callback called when we intercept requests.

(async) onLogEvent(connection, callback) → {Promise.<void>}

Parameters:
NameTypeDescription
connection
callback
Returns:
Type: 
Promise.<void>

(async) onLogException(connection, callback) → {Promise.<void>}

Parameters:
NameTypeDescription
connection
callback
Returns:
Type: 
Promise.<void>

printPage(options)

Takes a PDF of the current page. The driver makes a best effort to return a PDF based on the provided parameters.

Parameters:
NameTypeDescription
optionsObject

quit() → (non-null) {Promise.<void>}

Terminates the browser session. After calling quit, this instance will be invalidated and may no longer be used to issue commands against the browser.

Implements
Returns:

A promise that will be resolved when the command has completed.

Type: 
Promise.<void>

(async) register(username, password, connection)

Sets a listener for Fetch.authRequired event from CDP If event is triggered, it enters username and password and allows the test to move forward

Parameters:
NameTypeDescription
usernamestring
passwordstring
connection

CDP Connection

(async) removeAllCredentials()

Removes all the credentials from the authenticator.

(async) removeCredential(credential_id)

Removes a credential from the authenticator.

Parameters:
NameTypeDescription
credential_id

The ID of the credential to be removed.

(async) removeVirtualAuthenticator()

Removes a previously added virtual authenticator. The authenticator is no longer valid after removal, so no methods may be called.

setFileDetector(detector)

Sets the file detector that should be used with this instance.

Parameters:
NameTypeDescription
detectorinput.FileDetector

The detector to use or null.

(async) setUserVerified(verified)

Sets whether the authenticator will simulate success or fail on user verification.

Parameters:
NameTypeDescription
verified

true if the authenticator will pass user verification, false otherwise.

sleep(ms) → (non-null) {Promise.<void>}

Makes the driver sleep for the given amount of time.

Parameters:
NameTypeDescription
msnumber

The amount of time, in milliseconds, to sleep.

Returns:

A promise that will be resolved when the sleep has finished.

Type: 
Promise.<void>

switchTo() → (non-null) {TargetLocator}

Returns:

The target locator interface for this instance.

Type: 
TargetLocator

takeScreenshot() → (non-null) {Promise.<string>}

Takes a screenshot of the current page. The driver makes the best effort to return a screenshot of the following, in order of preference:

  1. Entire page
  2. Current window
  3. Visible portion of the current frame
  4. The entire display containing the browser
Returns:

A promise that will be resolved to the screenshot as a base-64 encoded PNG.

Type: 
Promise.<string>

virtualAuthenticatorId()

Returns:

The value of authenticator ID added

wait(conditionnon-null, timeoutopt, messageopt, pollTimeoutopt) → (non-null) {IThenable.<T>|WebElementPromise}

Waits for a condition to evaluate to a "truthy" value. The condition may be specified by a Condition, as a custom function, or as any promise-like thenable.

For a Condition or function, the wait will repeatedly evaluate the condition until it returns a truthy value. If any errors occur while evaluating the condition, they will be allowed to propagate. In the event a condition returns a Promise, the polling loop will wait for it to be resolved and use the resolved value for whether the condition has been satisfied. The resolution time for a promise is always factored into whether a wait has timed out.

If the provided condition is a WebElementCondition, then the wait will return a WebElementPromise that will resolve to the element that satisfied the condition.

Example: waiting up to 10 seconds for an element to be present on the page.

async function example() {
   let button =
       await driver.wait(until.elementLocated(By.id('foo')), 10000);
   await button.click();
@@ -50,4 +50,4 @@
 // If the createSession operation failed, then this command will also
 // also fail, propagating the creation failure.
 driver.get('http://www.google.com').catch(e => console.log(e));
-
Parameters:
NameTypeAttributesDescription
executorcommand.Executor

The executor to create the new session with.

capabilitiesCapabilities

The desired capabilities for the new session.

onQuitfunction<optional>

A callback to invoke when the newly created session is terminated. This should be used to clean up any resources associated with the session.

Returns:

The driver for the newly created session.

Type: 
WebDriver
Selenium WebDriver JavaScript API
\ No newline at end of file +
Parameters:
NameTypeAttributesDescription
executorcommand.Executor

The executor to create the new session with.

capabilitiesCapabilities

The desired capabilities for the new session.

onQuitfunction<optional>

A callback to invoke when the newly created session is terminated. This should be used to clean up any resources associated with the session.

Returns:

The driver for the newly created session.

Type: 
WebDriver
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/WebDriverError.html b/docs/api/javascript/WebDriverError.html index 54b001b96aed5..ff13d5024b02f 100644 --- a/docs/api/javascript/WebDriverError.html +++ b/docs/api/javascript/WebDriverError.html @@ -1,3 +1,3 @@ Class: WebDriverError
On this page

WebDriverError

The base WebDriver error type. This error type is only used directly when a more appropriate category is not defined for the offending error.

Constructor

new WebDriverError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Members

name

remoteStacktrace :string

A stacktrace reported by the remote webdriver endpoint that initially reported this error. This property will be an empty string if the remote end did not provide a stacktrace.

Type:
  • string
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

WebDriverError

The base WebDriver error type. This error type is only used directly when a more appropriate category is not defined for the offending error.

Constructor

new WebDriverError(opt_erroropt)

Parameters:
NameTypeAttributesDescription
opt_errorstring<optional>

the error message, if any.

Members

name

remoteStacktrace :string

A stacktrace reported by the remote webdriver endpoint that initially reported this error. This property will be an empty string if the remote end did not provide a stacktrace.

Type:
  • string
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/WebElement.html b/docs/api/javascript/WebElement.html index 7ab6d2e2b8a1e..9249038085486 100644 --- a/docs/api/javascript/WebElement.html +++ b/docs/api/javascript/WebElement.html @@ -1,10 +1,10 @@ Class: WebElement
On this page

WebElement

Represents a DOM element. WebElements can be found by searching from the document root using a WebDriver instance, or by searching under another WebElement:

driver.get('http://www.google.com');
+    
On this page

WebElement

Represents a DOM element. WebElements can be found by searching from the document root using a WebDriver instance, or by searching under another WebElement:

driver.get('http://www.google.com');
 var searchForm = driver.findElement(By.tagName('form'));
 var searchBox = searchForm.findElement(By.name('q'));
 searchBox.sendKeys('webdriver');
-

Constructor

new WebElement(drivernon-null, id)

Parameters:
NameTypeDescription
driverWebDriver

the parent WebDriver instance for this element.

id!IThenable.<string> | string

The server-assigned opaque ID for the underlying DOM element.

Methods

clear() → (non-null) {Promise.<void>}

Clear the value of this element. This command has no effect if the underlying DOM element is neither a text INPUT element nor a TEXTAREA element.

Returns:

A promise that will be resolved when the element has been cleared.

Type: 
Promise.<void>

click() → (non-null) {Promise.<void>}

Clicks on this element.

Returns:

A promise that will be resolved when the click command has completed.

Type: 
Promise.<void>

findElement(locatornon-null) → (non-null) {WebElementPromise}

Schedule a command to find a descendant of this element. If the element cannot be found, the returned promise will be rejected with a NoSuchElementError.

The search criteria for an element may be defined using one of the static factories on the by.By class, or as a short-hand ./by.ByHash object. For example, the following two statements are equivalent:

var e1 = element.findElement(By.id('foo'));
+

Constructor

new WebElement(drivernon-null, id)

Parameters:
NameTypeDescription
driverWebDriver

the parent WebDriver instance for this element.

id!IThenable.<string> | string

The server-assigned opaque ID for the underlying DOM element.

Methods

clear() → (non-null) {Promise.<void>}

Clear the value of this element. This command has no effect if the underlying DOM element is neither a text INPUT element nor a TEXTAREA element.

Returns:

A promise that will be resolved when the element has been cleared.

Type: 
Promise.<void>

click() → (non-null) {Promise.<void>}

Clicks on this element.

Returns:

A promise that will be resolved when the click command has completed.

Type: 
Promise.<void>

findElement(locatornon-null) → (non-null) {WebElementPromise}

Schedule a command to find a descendant of this element. If the element cannot be found, the returned promise will be rejected with a NoSuchElementError.

The search criteria for an element may be defined using one of the static factories on the by.By class, or as a short-hand ./by.ByHash object. For example, the following two statements are equivalent:

var e1 = element.findElement(By.id('foo'));
 var e2 = element.findElement({id:'foo'});
 

You may also provide a custom locator function, which takes as input this instance and returns a WebElement, or a promise that will resolve to a WebElement. If the returned promise resolves to an array of WebElements, WebDriver will use the first element. For example, to find the first visible link on a page, you could write:

var link = element.findElement(firstVisibleLink);
 
@@ -14,7 +14,7 @@
     return link.isDisplayed();
   });
 }
-
Parameters:
NameTypeDescription
locatorby.By | function

The locator strategy to use when searching for the element.

Returns:

A WebElement that can be used to issue commands against the located element. If the element is not found, the element will be invalidated and all scheduled commands aborted.

Type: 
WebElementPromise

(async) findElements(locatornon-null) → (non-null) {Promise.<!Array.<!WebElement>>}

Locates all the descendants of this element that match the given search criteria.

Parameters:
NameTypeDescription
locatorby.By | function

The locator strategy to use when searching for the element.

Returns:

A promise that will resolve to an array of WebElements.

Type: 
Promise.<!Array.<!WebElement>>

getAccessibleName() → (non-null) {Promise.<string>}

Get the computed WAI-ARIA label of element.

Returns:

A promise that will be resolved with the element's computed label.

Type: 
Promise.<string>

getAriaRole() → (non-null) {Promise.<string>}

Get the computed WAI-ARIA role of element.

Returns:

A promise that will be resolved with the element's computed role.

Type: 
Promise.<string>

getAttribute(attributeName) → (non-null) {Promise.<?string>}

Retrieves the current value of the given attribute of this element. Will return the current value, even if it has been modified after the page has been loaded. More exactly, this method will return the value of the given attribute, unless that attribute is not present, in which case the value of the property with the same name is returned. If neither value is set, null is returned (for example, the "value" property of a textarea element). The "style" attribute is converted as best can be to a text representation with a trailing semicolon. The following are deemed to be "boolean" attributes and will return either "true" or null:

async, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked, defaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, selected, spellcheck, truespeed, willvalidate

Finally, the following commonly mis-capitalized attribute/property names are evaluated as expected:

  • "class"
  • "readonly"
Parameters:
NameTypeDescription
attributeNamestring

The name of the attribute to query.

Returns:

A promise that will be resolved with the attribute's value. The returned value will always be either a string or null.

Type: 
Promise.<?string>

getCssValue(cssStyleProperty) → (non-null) {Promise.<string>}

Retrieves the value of a computed style property for this instance. If the element inherits the named style from its parent, the parent will be queried for its value. Where possible, color values will be converted to their hex representation (e.g. #00ff00 instead of rgb(0, 255, 0)).

Warning: the value returned will be as the browser interprets it, so it may be tricky to form a proper assertion.

Parameters:
NameTypeDescription
cssStylePropertystring

The name of the CSS style property to look up.

Returns:

A promise that will be resolved with the requested CSS value.

Type: 
Promise.<string>

getDomAttribute(attributeName)

Get the value of the given attribute of the element.

This method, unlike #getAttribute(String), returns the value of the attribute with the given name but not the property with the same name.

The following are deemed to be "boolean" attributes, and will return either "true" or null:

async, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked, defaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, selected, truespeed, willvalidate

See W3C WebDriver specification for more details.

Parameters:
NameTypeDescription
attributeName

The name of the attribute.

Returns:

The attribute's value or null if the value is not set.

getDriver() → (non-null) {WebDriver}

Returns:

The parent driver for this instance.

Type: 
WebDriver

getId() → (non-null) {Promise.<string>}

Returns:

A promise that resolves to the server-assigned opaque ID assigned to this element.

Type: 
Promise.<string>

getProperty(propertyName) → (non-null) {Promise.<string>}

Get the given property of the referenced web element

Parameters:
NameTypeDescription
propertyNamestring

The name of the attribute to query.

Returns:

A promise that will be resolved with the element's property value

Type: 
Promise.<string>

getRect() → (non-null) {Promise.<{width: number, height: number, x: number, y: number}>}

Returns an object describing an element's location, in pixels relative to the document element, and the element's size in pixels.

Returns:

A promise that will resolve with the element's rect.

Type: 
Promise.<{width: number, height: number, x: number, y: number}>

getShadowRoot() → (non-null) {Promise.<ShadowRoot>}

Get the shadow root of the current web element.

Returns:

A promise that will be resolved with the elements shadow root or rejected with NoSuchShadowRootError

Type: 
Promise.<ShadowRoot>

getTagName() → (non-null) {Promise.<string>}

Retrieves the element's tag name.

Returns:

A promise that will be resolved with the element's tag name.

Type: 
Promise.<string>

getText() → (non-null) {Promise.<string>}

Get the visible (i.e. not hidden by CSS) innerText of this element, including sub-elements, without any leading or trailing whitespace.

Returns:

A promise that will be resolved with the element's visible text.

Type: 
Promise.<string>

isDisplayed() → (non-null) {Promise.<boolean>}

Test whether this element is currently displayed.

Returns:

A promise that will be resolved with whether this element is currently visible on the page.

Type: 
Promise.<boolean>

isEnabled() → (non-null) {Promise.<boolean>}

Tests whether this element is enabled, as dictated by the disabled attribute.

Returns:

A promise that will be resolved with whether this element is currently enabled.

Type: 
Promise.<boolean>

isSelected() → (non-null) {Promise.<boolean>}

Tests whether this element is selected.

Returns:

A promise that will be resolved with whether this element is currently selected.

Type: 
Promise.<boolean>

(async) sendKeys(…args) → (non-null) {Promise.<void>}

Types a key sequence on the DOM element represented by this instance.

Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is processed in the key sequence, that key state is toggled until one of the following occurs:

  • The modifier key is encountered again in the sequence. At this point the state of the key is toggled (along with the appropriate keyup/down events).

  • The input.Key.NULL key is encountered in the sequence. When this key is encountered, all modifier keys current in the down state are released (with accompanying keyup events). The NULL key can be used to simulate common keyboard shortcuts:

      element.sendKeys("text was",
    +
Parameters:
NameTypeDescription
locatorby.By | function

The locator strategy to use when searching for the element.

Returns:

A WebElement that can be used to issue commands against the located element. If the element is not found, the element will be invalidated and all scheduled commands aborted.

Type: 
WebElementPromise

(async) findElements(locatornon-null) → (non-null) {Promise.<!Array.<!WebElement>>}

Locates all the descendants of this element that match the given search criteria.

Parameters:
NameTypeDescription
locatorby.By | function

The locator strategy to use when searching for the element.

Returns:

A promise that will resolve to an array of WebElements.

Type: 
Promise.<!Array.<!WebElement>>

getAccessibleName() → (non-null) {Promise.<string>}

Get the computed WAI-ARIA label of element.

Returns:

A promise that will be resolved with the element's computed label.

Type: 
Promise.<string>

getAriaRole() → (non-null) {Promise.<string>}

Get the computed WAI-ARIA role of element.

Returns:

A promise that will be resolved with the element's computed role.

Type: 
Promise.<string>

getAttribute(attributeName) → (non-null) {Promise.<?string>}

Retrieves the current value of the given attribute of this element. Will return the current value, even if it has been modified after the page has been loaded. More exactly, this method will return the value of the given attribute, unless that attribute is not present, in which case the value of the property with the same name is returned. If neither value is set, null is returned (for example, the "value" property of a textarea element). The "style" attribute is converted as best can be to a text representation with a trailing semicolon. The following are deemed to be "boolean" attributes and will return either "true" or null:

async, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked, defaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, selected, spellcheck, truespeed, willvalidate

Finally, the following commonly mis-capitalized attribute/property names are evaluated as expected:

  • "class"
  • "readonly"
Parameters:
NameTypeDescription
attributeNamestring

The name of the attribute to query.

Returns:

A promise that will be resolved with the attribute's value. The returned value will always be either a string or null.

Type: 
Promise.<?string>

getCssValue(cssStyleProperty) → (non-null) {Promise.<string>}

Retrieves the value of a computed style property for this instance. If the element inherits the named style from its parent, the parent will be queried for its value. Where possible, color values will be converted to their hex representation (e.g. #00ff00 instead of rgb(0, 255, 0)).

Warning: the value returned will be as the browser interprets it, so it may be tricky to form a proper assertion.

Parameters:
NameTypeDescription
cssStylePropertystring

The name of the CSS style property to look up.

Returns:

A promise that will be resolved with the requested CSS value.

Type: 
Promise.<string>

getDomAttribute(attributeName)

Get the value of the given attribute of the element.

This method, unlike #getAttribute(String), returns the value of the attribute with the given name but not the property with the same name.

The following are deemed to be "boolean" attributes, and will return either "true" or null:

async, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked, defaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, selected, truespeed, willvalidate

See W3C WebDriver specification for more details.

Parameters:
NameTypeDescription
attributeName

The name of the attribute.

Returns:

The attribute's value or null if the value is not set.

getDriver() → (non-null) {WebDriver}

Returns:

The parent driver for this instance.

Type: 
WebDriver

getId() → (non-null) {Promise.<string>}

Returns:

A promise that resolves to the server-assigned opaque ID assigned to this element.

Type: 
Promise.<string>

getProperty(propertyName) → (non-null) {Promise.<string>}

Get the given property of the referenced web element

Parameters:
NameTypeDescription
propertyNamestring

The name of the attribute to query.

Returns:

A promise that will be resolved with the element's property value

Type: 
Promise.<string>

getRect() → (non-null) {Promise.<{width: number, height: number, x: number, y: number}>}

Returns an object describing an element's location, in pixels relative to the document element, and the element's size in pixels.

Returns:

A promise that will resolve with the element's rect.

Type: 
Promise.<{width: number, height: number, x: number, y: number}>

getShadowRoot() → (non-null) {Promise.<ShadowRoot>}

Get the shadow root of the current web element.

Returns:

A promise that will be resolved with the elements shadow root or rejected with NoSuchShadowRootError

Type: 
Promise.<ShadowRoot>

getTagName() → (non-null) {Promise.<string>}

Retrieves the element's tag name.

Returns:

A promise that will be resolved with the element's tag name.

Type: 
Promise.<string>

getText() → (non-null) {Promise.<string>}

Get the visible (i.e. not hidden by CSS) innerText of this element, including sub-elements, without any leading or trailing whitespace.

Returns:

A promise that will be resolved with the element's visible text.

Type: 
Promise.<string>

isDisplayed() → (non-null) {Promise.<boolean>}

Test whether this element is currently displayed.

Returns:

A promise that will be resolved with whether this element is currently visible on the page.

Type: 
Promise.<boolean>

isEnabled() → (non-null) {Promise.<boolean>}

Tests whether this element is enabled, as dictated by the disabled attribute.

Returns:

A promise that will be resolved with whether this element is currently enabled.

Type: 
Promise.<boolean>

isSelected() → (non-null) {Promise.<boolean>}

Tests whether this element is selected.

Returns:

A promise that will be resolved with whether this element is currently selected.

Type: 
Promise.<boolean>

(async) sendKeys(…args) → (non-null) {Promise.<void>}

Types a key sequence on the DOM element represented by this instance.

Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is processed in the key sequence, that key state is toggled until one of the following occurs:

  • The modifier key is encountered again in the sequence. At this point the state of the key is toggled (along with the appropriate keyup/down events).

  • The input.Key.NULL key is encountered in the sequence. When this key is encountered, all modifier keys current in the down state are released (with accompanying keyup events). The NULL key can be used to simulate common keyboard shortcuts:

      element.sendKeys("text was",
                        Key.CONTROL, "a", Key.NULL,
                        "now text is");
       // Alternatively:
    @@ -25,4 +25,4 @@
     var element = form.findElement(By.css('input[type=file]'));
     element.sendKeys('/path/to/file.txt');
     form.submit();
    -

    For uploads to function correctly, the entered path must reference a file on the browser's machine, not the local machine running this script. When running against a remote Selenium server, a input.FileDetector may be used to transparently copy files to the remote machine before attempting to upload them in the browser.

    Note: On browsers where native keyboard events are not supported (e.g. Firefox on OS X), key events will be synthesized. Special punctuation keys will be synthesized according to a standard QWERTY en-us keyboard layout.

Parameters:
NameTypeAttributesDescription
argsnumber | string | !IThenable.<(number|string)><repeatable>

The sequence of keys to type. Number keys may be referenced numerically or by string (1 or '1'). All arguments will be joined into a single sequence.

Returns:

A promise that will be resolved when all keys have been typed.

Type: 
Promise.<void>

submit() → (non-null) {Promise.<void>}

Submits the form containing this element (or this element if it is itself a FORM element). his command is a no-op if the element is not contained in a form.

Returns:

A promise that will be resolved when the form has been submitted.

Type: 
Promise.<void>

takeScreenshot() → (non-null) {Promise.<string>}

Take a screenshot of the visible region encompassed by this element's bounding rectangle.

Returns:

A promise that will be resolved to the screenshot as a base-64 encoded PNG.

Type: 
Promise.<string>

(static) buildId(id, noLegacyopt) → (non-null) {Object}

Parameters:
NameTypeAttributesDefaultDescription
idstring

The raw ID.

noLegacyboolean<optional>
false

Whether to exclude the legacy element key.

Returns:

The element ID for use with WebDriver's wire protocol.

Type: 
Object

(async, static) equals(anon-null, bnon-null) → (non-null) {Promise.<boolean>}

Compares two WebElements for equality.

Parameters:
NameTypeDescription
aWebElement

A WebElement.

bWebElement

A WebElement.

Returns:

A promise that will be resolved to whether the two WebElements are equal.

Type: 
Promise.<boolean>

(static) extractId(obj) → {string}

Extracts the encoded WebElement ID from the object.

Parameters:
NameTypeDescription
obj?

The object to extract the ID from.

Throws:

if the object is not a valid encoded ID.

Type
TypeError
Returns:

the extracted ID.

Type: 
string

(static) isId(obj) → {boolean}

Parameters:
NameTypeDescription
obj?

the object to test.

Returns:

whether the object is a valid encoded WebElement ID.

Type: 
boolean
Selenium WebDriver JavaScript API
\ No newline at end of file +

For uploads to function correctly, the entered path must reference a file on the browser's machine, not the local machine running this script. When running against a remote Selenium server, a input.FileDetector may be used to transparently copy files to the remote machine before attempting to upload them in the browser.

Note: On browsers where native keyboard events are not supported (e.g. Firefox on OS X), key events will be synthesized. Special punctuation keys will be synthesized according to a standard QWERTY en-us keyboard layout.

Parameters:
NameTypeAttributesDescription
argsnumber | string | !IThenable.<(number|string)><repeatable>

The sequence of keys to type. Number keys may be referenced numerically or by string (1 or '1'). All arguments will be joined into a single sequence.

Returns:

A promise that will be resolved when all keys have been typed.

Type: 
Promise.<void>

submit() → (non-null) {Promise.<void>}

Submits the form containing this element (or this element if it is itself a FORM element). his command is a no-op if the element is not contained in a form.

Returns:

A promise that will be resolved when the form has been submitted.

Type: 
Promise.<void>

takeScreenshot() → (non-null) {Promise.<string>}

Take a screenshot of the visible region encompassed by this element's bounding rectangle.

Returns:

A promise that will be resolved to the screenshot as a base-64 encoded PNG.

Type: 
Promise.<string>

(static) buildId(id, noLegacyopt) → (non-null) {Object}

Parameters:
NameTypeAttributesDefaultDescription
idstring

The raw ID.

noLegacyboolean<optional>
false

Whether to exclude the legacy element key.

Returns:

The element ID for use with WebDriver's wire protocol.

Type: 
Object

(async, static) equals(anon-null, bnon-null) → (non-null) {Promise.<boolean>}

Compares two WebElements for equality.

Parameters:
NameTypeDescription
aWebElement

A WebElement.

bWebElement

A WebElement.

Returns:

A promise that will be resolved to whether the two WebElements are equal.

Type: 
Promise.<boolean>

(static) extractId(obj) → {string}

Extracts the encoded WebElement ID from the object.

Parameters:
NameTypeDescription
obj?

The object to extract the ID from.

Throws:

if the object is not a valid encoded ID.

Type
TypeError
Returns:

the extracted ID.

Type: 
string

(static) isId(obj) → {boolean}

Parameters:
NameTypeDescription
obj?

the object to test.

Returns:

whether the object is a valid encoded WebElement ID.

Type: 
boolean
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/WebElementCondition.html b/docs/api/javascript/WebElementCondition.html index 66ef4ae08f060..e0ce4a4dec5ec 100644 --- a/docs/api/javascript/WebElementCondition.html +++ b/docs/api/javascript/WebElementCondition.html @@ -1,3 +1,3 @@ Class: WebElementCondition
On this page

WebElementCondition

Defines a condition that will result in a WebElement.

Constructor

new WebElementCondition(message, fn)

Parameters:
NameTypeDescription
messagestring

A descriptive error message. Should complete the sentence "Waiting [...]"

fnfunction

The condition function to evaluate on each iteration of the wait loop.

Extends

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

WebElementCondition

Defines a condition that will result in a WebElement.

Constructor

new WebElementCondition(message, fn)

Parameters:
NameTypeDescription
messagestring

A descriptive error message. Should complete the sentence "Waiting [...]"

fnfunction

The condition function to evaluate on each iteration of the wait loop.

Extends

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/WebElementPromise.html b/docs/api/javascript/WebElementPromise.html index 390380161f6ce..47d6727dc4698 100644 --- a/docs/api/javascript/WebElementPromise.html +++ b/docs/api/javascript/WebElementPromise.html @@ -1,7 +1,7 @@ Class: WebElementPromise
On this page

WebElementPromise

WebElementPromise is a promise that will be fulfilled with a WebElement. This serves as a forward proxy on WebElement, allowing calls to be scheduled without directly on this instance before the underlying WebElement has been fulfilled. In other words, the following two statements are equivalent:

driver.findElement({id: 'my-button'}).click();
+    
On this page

WebElementPromise

WebElementPromise is a promise that will be fulfilled with a WebElement. This serves as a forward proxy on WebElement, allowing calls to be scheduled without directly on this instance before the underlying WebElement has been fulfilled. In other words, the following two statements are equivalent:

driver.findElement({id: 'my-button'}).click();
 driver.findElement({id: 'my-button'}).then(function(el) {
   return el.click();
 });
-

Constructor

new WebElementPromise(drivernon-null, elnon-null)

Parameters:
NameTypeDescription
driverWebDriver

The parent WebDriver instance for this element.

elPromise.<!WebElement>

A promise that will resolve to the promised element.

Implements

Members

catch

then

Methods

getId()

Defers returning the element ID until the wrapped WebElement has been resolved.

Selenium WebDriver JavaScript API
\ No newline at end of file +

Constructor

new WebElementPromise(drivernon-null, elnon-null)

Parameters:
NameTypeDescription
driverWebDriver

The parent WebDriver instance for this element.

elPromise.<!WebElement>

A promise that will resolve to the promised element.

Implements

Members

catch

then

Methods

getId()

Defers returning the element ID until the wrapped WebElement has been resolved.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Wheel.html b/docs/api/javascript/Wheel.html index 0829208f8f0cf..fbc01970d36c2 100644 --- a/docs/api/javascript/Wheel.html +++ b/docs/api/javascript/Wheel.html @@ -1,3 +1,3 @@ Class: Wheel
On this page

Wheel

new Wheel(id)

Parameters:
NameTypeDescription
idstring

the device ID..

Methods

scroll(x, y, deltaX, deltaY, origin, duration) → (non-null) {Action}

Scrolls a page via the coordinates given

Parameters:
NameTypeDescription
xnumber

starting x coordinate

ynumber

starting y coordinate

deltaXnumber

Delta X to scroll to target

deltaYnumber

Delta Y to scroll to target

originWebElement

element origin

durationnumber

duration ratio be the ratio of time delta and duration

Returns:

An action to scroll with this device.

Type: 
Action
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Wheel

new Wheel(id)

Parameters:
NameTypeDescription
idstring

the device ID..

Methods

scroll(x, y, deltaX, deltaY, origin, duration) → (non-null) {Action}

Scrolls a page via the coordinates given

Parameters:
NameTypeDescription
xnumber

starting x coordinate

ynumber

starting y coordinate

deltaXnumber

Delta X to scroll to target

deltaYnumber

Delta Y to scroll to target

originWebElement

element origin

durationnumber

duration ratio be the ratio of time delta and duration

Returns:

An action to scroll with this device.

Type: 
Action
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/WindowRealmInfo.html b/docs/api/javascript/WindowRealmInfo.html index 20353b4aaceb4..c52db1d7b7b0c 100644 --- a/docs/api/javascript/WindowRealmInfo.html +++ b/docs/api/javascript/WindowRealmInfo.html @@ -1,3 +1,3 @@ Class: WindowRealmInfo
On this page

WindowRealmInfo

Represents information about a window realm.

Constructor

new WindowRealmInfo(realmId, origin, realmType, browsingContext, sandbox)

Constructs a new instance of the WindowRealmInfo class.

Parameters:
NameTypeDefaultDescription
realmIdstring

The ID of the realm.

originstring

The origin of the realm.

realmTypestring

The type of the realm.

browsingContextstring

The browsing context of the realm.

sandboxstring | nullnull

The sandbox of the realm (optional).

Extends

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

WindowRealmInfo

Represents information about a window realm.

Constructor

new WindowRealmInfo(realmId, origin, realmType, browsingContext, sandbox)

Constructs a new instance of the WindowRealmInfo class.

Parameters:
NameTypeDefaultDescription
realmIdstring

The ID of the realm.

originstring

The origin of the realm.

realmTypestring

The type of the realm.

browsingContextstring

The browsing context of the realm.

sandboxstring | nullnull

The sandbox of the realm (optional).

Extends

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/Zip.html b/docs/api/javascript/Zip.html index b7398e399c6a7..17e12a68b2e36 100644 --- a/docs/api/javascript/Zip.html +++ b/docs/api/javascript/Zip.html @@ -1,3 +1,3 @@ Class: Zip
On this page

Zip

Manages a zip archive.

Constructor

new Zip()

Methods

addDir(dirPath, zipPathopt) → (non-null) {Promise.<?>}

Recursively adds a directory and all of its contents to this archive.

Parameters:
NameTypeAttributesDescription
dirPathstring

path to the directory to add.

zipPathstring<optional>

path to the folder in the archive to add the directory contents to. Defaults to the root folder.

Returns:

returns a promise that will resolve when the operation is complete.

Type: 
Promise.<?>

addFile(filePath, zipPathopt) → (non-null) {Promise.<?>}

Adds a file to this zip.

Parameters:
NameTypeAttributesDescription
filePathstring

path to the file to add.

zipPathstring<optional>

path to the file in the zip archive, defaults to the basename of filePath.

Returns:

a promise that will resolve when added.

Type: 
Promise.<?>

getFile(path) → (non-null) {Promise.<!Buffer>}

Returns the contents of the file in this zip archive with the given path. The returned promise will be rejected with an InvalidArgumentError if either path does not exist within the archive, or if path refers to a directory.

Parameters:
NameTypeDescription
pathstring

the path to the file whose contents to return.

Returns:

a promise that will be resolved with the file's contents as a buffer.

Type: 
Promise.<!Buffer>

has(path) → {boolean}

Parameters:
NameTypeDescription
pathstring

File path to test for within the archive.

Returns:

Whether this zip archive contains an entry with the given path.

Type: 
boolean

toBuffer(compression) → (non-null) {Promise.<!Buffer>}

Returns the compressed data for this archive in a buffer. This method will not wait for any outstanding add operations before encoding the archive.

Parameters:
NameTypeDefaultDescription
compressionstringSTORE

The desired compression. Must be STORE (the default) or DEFLATE.

Returns:

a promise that will resolve with this archive as a buffer.

Type: 
Promise.<!Buffer>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Zip

Manages a zip archive.

Constructor

new Zip()

Methods

addDir(dirPath, zipPathopt) → (non-null) {Promise.<?>}

Recursively adds a directory and all of its contents to this archive.

Parameters:
NameTypeAttributesDescription
dirPathstring

path to the directory to add.

zipPathstring<optional>

path to the folder in the archive to add the directory contents to. Defaults to the root folder.

Returns:

returns a promise that will resolve when the operation is complete.

Type: 
Promise.<?>

addFile(filePath, zipPathopt) → (non-null) {Promise.<?>}

Adds a file to this zip.

Parameters:
NameTypeAttributesDescription
filePathstring

path to the file to add.

zipPathstring<optional>

path to the file in the zip archive, defaults to the basename of filePath.

Returns:

a promise that will resolve when added.

Type: 
Promise.<?>

getFile(path) → (non-null) {Promise.<!Buffer>}

Returns the contents of the file in this zip archive with the given path. The returned promise will be rejected with an InvalidArgumentError if either path does not exist within the archive, or if path refers to a directory.

Parameters:
NameTypeDescription
pathstring

the path to the file whose contents to return.

Returns:

a promise that will be resolved with the file's contents as a buffer.

Type: 
Promise.<!Buffer>

has(path) → {boolean}

Parameters:
NameTypeDescription
pathstring

File path to test for within the archive.

Returns:

Whether this zip archive contains an entry with the given path.

Type: 
boolean

toBuffer(compression) → (non-null) {Promise.<!Buffer>}

Returns the compressed data for this archive in a buffer. This method will not wait for any outstanding add operations before encoding the archive.

Parameters:
NameTypeDefaultDescription
compressionstringSTORE

The desired compression. Must be STORE (the default) or DEFLATE.

Returns:

a promise that will resolve with this archive as a buffer.

Type: 
Promise.<!Buffer>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_addInterceptParameters.js.html b/docs/api/javascript/bidi_addInterceptParameters.js.html index 7b5bf7f77fdfe..d83d42506a07c 100644 --- a/docs/api/javascript/bidi_addInterceptParameters.js.html +++ b/docs/api/javascript/bidi_addInterceptParameters.js.html @@ -1,6 +1,6 @@ Source: bidi/addInterceptParameters.js
On this page

bidi_addInterceptParameters.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_addInterceptParameters.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -106,4 +106,4 @@
 }
 
 module.exports = { AddInterceptParameters }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_argumentValue.js.html b/docs/api/javascript/bidi_argumentValue.js.html index 2b10818389369..6fc3cc5f9a3c8 100644 --- a/docs/api/javascript/bidi_argumentValue.js.html +++ b/docs/api/javascript/bidi_argumentValue.js.html @@ -1,6 +1,6 @@ Source: bidi/argumentValue.js
On this page

bidi_argumentValue.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_argumentValue.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -40,4 +40,4 @@
 }
 
 module.exports = { ArgumentValue }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_browser.js.html b/docs/api/javascript/bidi_browser.js.html index 841e20a5a54b1..5e938804f8359 100644 --- a/docs/api/javascript/bidi_browser.js.html +++ b/docs/api/javascript/bidi_browser.js.html @@ -1,6 +1,6 @@ Source: bidi/browser.js
On this page

bidi_browser.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_browser.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -17,6 +17,8 @@
 // specific language governing permissions and limitations
 // under the License.
 
+const { WindowState, ClientWindowInfo } = require('./clientWindowInfo')
+
 /**
  * Represents the commands and events under Browser Module.
  * Described in https://w3c.github.io/webdriver-bidi/#module-browser
@@ -85,6 +87,20 @@
 
     await this.bidi.send(command)
   }
+
+  /**
+   * Gets information about all client windows.
+   * @returns {Promise<ClientWindowInfo[]>} Array of client window information
+   */
+  async getClientWindows() {
+    const command = {
+      method: 'browser.getClientWindows',
+      params: {},
+    }
+
+    const response = await this.bidi.send(command)
+    return response.result.clientWindows.map((window) => ClientWindowInfo.fromJson(window))
+  }
 }
 
 async function getBrowserInstance(driver) {
@@ -94,4 +110,5 @@
 }
 
 module.exports = getBrowserInstance
-
Selenium WebDriver JavaScript API
\ No newline at end of file +module.exports.WindowState = WindowState +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_browsingContext.js.html b/docs/api/javascript/bidi_browsingContext.js.html index c31546aa0a19a..eb243de38c272 100644 --- a/docs/api/javascript/bidi_browsingContext.js.html +++ b/docs/api/javascript/bidi_browsingContext.js.html @@ -1,6 +1,6 @@ Source: bidi/browsingContext.js
On this page

bidi_browsingContext.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_browsingContext.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -660,4 +660,4 @@
 
 module.exports = getBrowsingContextInstance
 module.exports.Locator = Locator
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_browsingContextInspector.js.html b/docs/api/javascript/bidi_browsingContextInspector.js.html index d4e56028ae4e6..60c6f7d79bf6d 100644 --- a/docs/api/javascript/bidi_browsingContextInspector.js.html +++ b/docs/api/javascript/bidi_browsingContextInspector.js.html @@ -1,6 +1,6 @@ Source: bidi/browsingContextInspector.js
On this page

bidi_browsingContextInspector.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_browsingContextInspector.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -172,4 +172,4 @@
 }
 
 module.exports = getBrowsingContextInstance
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_browsingContextTypes.js.html b/docs/api/javascript/bidi_browsingContextTypes.js.html index dd4c82429a041..6e0e7cb161cf6 100644 --- a/docs/api/javascript/bidi_browsingContextTypes.js.html +++ b/docs/api/javascript/bidi_browsingContextTypes.js.html @@ -1,6 +1,6 @@ Source: bidi/browsingContextTypes.js
On this page

bidi_browsingContextTypes.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_browsingContextTypes.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -99,4 +99,4 @@
 }
 
 module.exports = { BrowsingContextInfo, NavigationInfo, UserPromptOpened, UserPromptClosed }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_captureScreenshotParameters.js.html b/docs/api/javascript/bidi_captureScreenshotParameters.js.html index e20aef78ad7a4..0b4d3daced814 100644 --- a/docs/api/javascript/bidi_captureScreenshotParameters.js.html +++ b/docs/api/javascript/bidi_captureScreenshotParameters.js.html @@ -1,6 +1,6 @@ Source: bidi/captureScreenshotParameters.js
On this page

bidi_captureScreenshotParameters.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_captureScreenshotParameters.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -96,4 +96,4 @@
 }
 
 module.exports = { CaptureScreenshotParameters, Origin }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_clientWindowInfo.js.html b/docs/api/javascript/bidi_clientWindowInfo.js.html new file mode 100644 index 0000000000000..949f4f480e150 --- /dev/null +++ b/docs/api/javascript/bidi_clientWindowInfo.js.html @@ -0,0 +1,57 @@ +Source: bidi/clientWindowInfo.js
On this page

bidi_clientWindowInfo.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The SFC licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+const WindowState = Object.freeze({
+  FULLSCREEN: 'fullscreen',
+  MAXIMIZED: 'maximized',
+  MINIMIZED: 'minimized',
+  NORMAL: 'normal',
+})
+
+class ClientWindowInfo {
+  /**
+   * @param {Object} params Window information parameters
+   * @param {string} params.clientWindow Window identifier
+   * @param {string} params.state Window state from WindowState
+   * @param {number} params.width Window width
+   * @param {number} params.height Window height
+   * @param {number} params.x Window x coordinate
+   * @param {number} params.y Window y coordinate
+   * @param {boolean} params.active Whether window is active and can receive keyboard input
+   */
+  constructor({ clientWindow, state, width, height, x, y, active }) {
+    this.clientWindow = clientWindow
+    this.state = state
+    this.width = width
+    this.height = height
+    this.x = x
+    this.y = y
+    this.active = active
+  }
+
+  static fromJson(json) {
+    return new ClientWindowInfo({
+      ...json,
+      state: json.state.toLowerCase(),
+    })
+  }
+}
+
+module.exports = { WindowState, ClientWindowInfo }
+
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_clipRectangle.js.html b/docs/api/javascript/bidi_clipRectangle.js.html index 11dc50649c338..87ff4df473504 100644 --- a/docs/api/javascript/bidi_clipRectangle.js.html +++ b/docs/api/javascript/bidi_clipRectangle.js.html @@ -1,6 +1,6 @@ Source: bidi/clipRectangle.js
On this page

bidi_clipRectangle.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_clipRectangle.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -127,4 +127,4 @@
 }
 
 module.exports = { BoxClipRectangle, ElementClipRectangle }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_continueRequestParameters.js.html b/docs/api/javascript/bidi_continueRequestParameters.js.html index b98da76b42ee4..fc25a33a0d88a 100644 --- a/docs/api/javascript/bidi_continueRequestParameters.js.html +++ b/docs/api/javascript/bidi_continueRequestParameters.js.html @@ -1,6 +1,6 @@ Source: bidi/continueRequestParameters.js
On this page

bidi_continueRequestParameters.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_continueRequestParameters.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -122,4 +122,4 @@
 }
 
 module.exports = { ContinueRequestParameters }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_continueResponseParameters.js.html b/docs/api/javascript/bidi_continueResponseParameters.js.html index 28d3cc5b3acba..2f6c6d734475b 100644 --- a/docs/api/javascript/bidi_continueResponseParameters.js.html +++ b/docs/api/javascript/bidi_continueResponseParameters.js.html @@ -1,6 +1,6 @@ Source: bidi/continueResponseParameters.js
On this page

bidi_continueResponseParameters.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_continueResponseParameters.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -129,4 +129,4 @@
 }
 
 module.exports = { ContinueResponseParameters }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_cookieFilter.js.html b/docs/api/javascript/bidi_cookieFilter.js.html index 478fa5282c3b0..28100ac60b705 100644 --- a/docs/api/javascript/bidi_cookieFilter.js.html +++ b/docs/api/javascript/bidi_cookieFilter.js.html @@ -1,6 +1,6 @@ Source: bidi/cookieFilter.js
On this page

bidi_cookieFilter.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_cookieFilter.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -139,4 +139,4 @@
 }
 
 module.exports = { CookieFilter }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_createContextParameters.js.html b/docs/api/javascript/bidi_createContextParameters.js.html index 98f039085ba86..c0f061621f425 100644 --- a/docs/api/javascript/bidi_createContextParameters.js.html +++ b/docs/api/javascript/bidi_createContextParameters.js.html @@ -1,6 +1,6 @@ Source: bidi/createContextParameters.js
On this page

bidi_createContextParameters.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_createContextParameters.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -73,4 +73,4 @@
 }
 
 module.exports = { CreateContextParameters }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_evaluateResult.js.html b/docs/api/javascript/bidi_evaluateResult.js.html index 9c8086e187ba3..938acfd6c1e96 100644 --- a/docs/api/javascript/bidi_evaluateResult.js.html +++ b/docs/api/javascript/bidi_evaluateResult.js.html @@ -1,6 +1,6 @@ Source: bidi/evaluateResult.js
On this page

bidi_evaluateResult.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_evaluateResult.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -71,4 +71,4 @@
   EvaluateResultException,
   ExceptionDetails,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_external_permissions.js.html b/docs/api/javascript/bidi_external_permissions.js.html new file mode 100644 index 0000000000000..a5a6aaf769f19 --- /dev/null +++ b/docs/api/javascript/bidi_external_permissions.js.html @@ -0,0 +1,76 @@ +Source: bidi/external/permissions.js
On this page

bidi_external_permissions.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The SFC licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+const PermissionState = Object.freeze({
+  GRANTED: 'granted',
+  DENIED: 'denied',
+  PROMPT: 'prompt',
+})
+
+class Permission {
+  constructor(driver) {
+    this._driver = driver
+  }
+
+  async init() {
+    if (!(await this._driver.getCapabilities()).get('webSocketUrl')) {
+      throw Error('WebDriver instance must support BiDi protocol')
+    }
+
+    this.bidi = await this._driver.getBidi()
+  }
+
+  /**
+   * Sets a permission state for a given permission descriptor.
+   * @param {Object} permissionDescriptor The permission descriptor.
+   * @param {string} state The permission state (granted, denied, prompt).
+   * @param {string} origin The origin for which the permission is set.
+   * @param {string} [userContext] The user context id (optional).
+   * @returns {Promise<void>}
+   */
+  async setPermission(permissionDescriptor, state, origin, userContext = null) {
+    if (!Object.values(PermissionState).includes(state)) {
+      throw new Error(`Invalid permission state. Must be one of: ${Object.values(PermissionState).join(', ')}`)
+    }
+
+    const command = {
+      method: 'permissions.setPermission',
+      params: {
+        descriptor: permissionDescriptor,
+        state: state,
+        origin: origin,
+      },
+    }
+
+    if (userContext) {
+      command.params.userContext = userContext
+    }
+
+    await this.bidi.send(command)
+  }
+}
+
+async function getPermissionInstance(driver) {
+  let instance = new Permission(driver)
+  await instance.init()
+  return instance
+}
+
+module.exports = { getPermissionInstance, PermissionState }
+
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_index.js.html b/docs/api/javascript/bidi_index.js.html index 8dfd4f0ad8f69..38d1e251ea880 100644 --- a/docs/api/javascript/bidi_index.js.html +++ b/docs/api/javascript/bidi_index.js.html @@ -1,6 +1,6 @@ Source: bidi/index.js
On this page

bidi_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -233,4 +233,4 @@
  * @type {function(*): Promise<Index>}
  */
 module.exports = Index
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_input.js.html b/docs/api/javascript/bidi_input.js.html index f1d2b24452008..53350af311726 100644 --- a/docs/api/javascript/bidi_input.js.html +++ b/docs/api/javascript/bidi_input.js.html @@ -1,6 +1,6 @@ Source: bidi/input.js
On this page

bidi_input.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_input.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -141,4 +141,4 @@
 }
 
 module.exports = getInputInstance
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_interceptPhase.js.html b/docs/api/javascript/bidi_interceptPhase.js.html index b20294f38f095..da302cf228eed 100644 --- a/docs/api/javascript/bidi_interceptPhase.js.html +++ b/docs/api/javascript/bidi_interceptPhase.js.html @@ -1,6 +1,6 @@ Source: bidi/interceptPhase.js
On this page

bidi_interceptPhase.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_interceptPhase.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -28,4 +28,4 @@
 }
 
 module.exports = { InterceptPhase }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_logEntries.js.html b/docs/api/javascript/bidi_logEntries.js.html index 327e19a381aaa..f5bb22ec789cb 100644 --- a/docs/api/javascript/bidi_logEntries.js.html +++ b/docs/api/javascript/bidi_logEntries.js.html @@ -1,6 +1,6 @@ Source: bidi/logEntries.js
On this page

bidi_logEntries.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_logEntries.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -156,4 +156,4 @@
   ConsoleLogEntry,
   JavascriptLogEntry,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_logInspector.js.html b/docs/api/javascript/bidi_logInspector.js.html index b819bbce0cc86..7988f7ac3ae62 100644 --- a/docs/api/javascript/bidi_logInspector.js.html +++ b/docs/api/javascript/bidi_logInspector.js.html @@ -1,6 +1,6 @@ Source: bidi/logInspector.js
On this page

bidi_logInspector.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_logInspector.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -365,4 +365,4 @@
  * @type {function(*, *): Promise<LogInspector>}
  */
 module.exports = getLogInspectorInstance
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_network.js.html b/docs/api/javascript/bidi_network.js.html index 85da3e6c34996..5511d2d795f53 100644 --- a/docs/api/javascript/bidi_network.js.html +++ b/docs/api/javascript/bidi_network.js.html @@ -1,6 +1,6 @@ Source: bidi/network.js
On this page

bidi_network.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_network.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -31,6 +31,11 @@
   FETCH_ERROR: 'network.fetchError',
 }
 
+const CacheBehavior = Object.freeze({
+  DEFAULT: 'default',
+  BYPASS: 'bypass',
+})
+
 /**
  * Represents all commands and events of Network module.
  * Described in https://w3c.github.io/webdriver-bidi/#module-network.
@@ -357,6 +362,40 @@
     await this.bidi.send(command)
   }
 
+  /**
+   * Sets the cache behavior for network requests.
+   *
+   * @param {string} behavior - The cache behavior ("default" or "bypass")
+   * @param {Array<string>} [contexts] - Optional array of browsing context IDs
+   * @returns {Promise<void>} A promise that resolves when the cache behavior is set
+   * @throws {Error} If behavior is invalid or context IDs are invalid
+   */
+  async setCacheBehavior(behavior, contexts = null) {
+    if (!Object.values(CacheBehavior).includes(behavior)) {
+      throw new Error(`Cache behavior must be either "${CacheBehavior.DEFAULT}" or "${CacheBehavior.BYPASS}"`)
+    }
+
+    const command = {
+      method: 'network.setCacheBehavior',
+      params: {
+        cacheBehavior: behavior,
+      },
+    }
+
+    if (contexts !== null) {
+      if (
+        !Array.isArray(contexts) ||
+        contexts.length === 0 ||
+        contexts.some((c) => typeof c !== 'string' || c.trim() === '')
+      ) {
+        throw new Error('Contexts must be an array of non-empty strings')
+      }
+      command.params.contexts = contexts
+    }
+
+    await this.bidi.send(command)
+  }
+
   /**
    * Unsubscribes from network events for all browsing contexts.
    * @returns {Promise<void>} A promise that resolves when the network connection is closed.
@@ -391,5 +430,5 @@
   return instance
 }
 
-module.exports = getNetworkInstance
-
Selenium WebDriver JavaScript API
\ No newline at end of file +module.exports = { Network: getNetworkInstance, CacheBehavior } +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_networkInspector.js.html b/docs/api/javascript/bidi_networkInspector.js.html index cf727edfe9d08..1e3ce25afabea 100644 --- a/docs/api/javascript/bidi_networkInspector.js.html +++ b/docs/api/javascript/bidi_networkInspector.js.html @@ -1,6 +1,6 @@ Source: bidi/networkInspector.js
On this page

bidi_networkInspector.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_networkInspector.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -98,4 +98,4 @@
 }
 
 module.exports = getNetworkInspectorInstance
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_networkTypes.js.html b/docs/api/javascript/bidi_networkTypes.js.html index 122a78a107590..508553cb2c70e 100644 --- a/docs/api/javascript/bidi_networkTypes.js.html +++ b/docs/api/javascript/bidi_networkTypes.js.html @@ -1,6 +1,6 @@ Source: bidi/networkTypes.js
On this page

bidi_networkTypes.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_networkTypes.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -833,4 +833,4 @@
 }
 
 module.exports = { Header, BytesValue, Cookie, SameSite, BeforeRequestSent, ResponseStarted, FetchError }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_partialCookie.js.html b/docs/api/javascript/bidi_partialCookie.js.html index 4d7092466e5fe..fa7d8bdcdf5a2 100644 --- a/docs/api/javascript/bidi_partialCookie.js.html +++ b/docs/api/javascript/bidi_partialCookie.js.html @@ -1,6 +1,6 @@ Source: bidi/partialCookie.js
On this page

bidi_partialCookie.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_partialCookie.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -115,4 +115,4 @@
 }
 
 module.exports = { PartialCookie }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_partitionDescriptor.js.html b/docs/api/javascript/bidi_partitionDescriptor.js.html index 65edb7351c3e0..26c019da0b93a 100644 --- a/docs/api/javascript/bidi_partitionDescriptor.js.html +++ b/docs/api/javascript/bidi_partitionDescriptor.js.html @@ -1,6 +1,6 @@ Source: bidi/partitionDescriptor.js
On this page

bidi_partitionDescriptor.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_partitionDescriptor.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -102,4 +102,4 @@
 }
 
 module.exports = { BrowsingContextPartitionDescriptor, StorageKeyPartitionDescriptor }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_partitionKey.js.html b/docs/api/javascript/bidi_partitionKey.js.html index 232e7db1f91aa..e5f85a320857c 100644 --- a/docs/api/javascript/bidi_partitionKey.js.html +++ b/docs/api/javascript/bidi_partitionKey.js.html @@ -1,6 +1,6 @@ Source: bidi/partitionKey.js
On this page

bidi_partitionKey.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_partitionKey.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -53,4 +53,4 @@
 }
 
 module.exports = { PartitionKey }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_protocolType.js.html b/docs/api/javascript/bidi_protocolType.js.html index 78c512a64a09c..06c9dfcb12448 100644 --- a/docs/api/javascript/bidi_protocolType.js.html +++ b/docs/api/javascript/bidi_protocolType.js.html @@ -1,6 +1,6 @@ Source: bidi/protocolType.js
On this page

bidi_protocolType.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_protocolType.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -112,4 +112,4 @@
   RemoteType,
   SpecialNumberType,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_protocolValue.js.html b/docs/api/javascript/bidi_protocolValue.js.html index c83019953ae1b..ef59ec5a31f2a 100644 --- a/docs/api/javascript/bidi_protocolValue.js.html +++ b/docs/api/javascript/bidi_protocolValue.js.html @@ -1,6 +1,6 @@ Source: bidi/protocolValue.js
On this page

bidi_protocolValue.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_protocolValue.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -452,4 +452,4 @@
   RegExpValue,
   SerializationOptions,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_provideResponseParameters.js.html b/docs/api/javascript/bidi_provideResponseParameters.js.html index 8ab613177ca77..2e59885d96225 100644 --- a/docs/api/javascript/bidi_provideResponseParameters.js.html +++ b/docs/api/javascript/bidi_provideResponseParameters.js.html @@ -1,6 +1,6 @@ Source: bidi/provideResponseParameters.js
On this page

bidi_provideResponseParameters.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_provideResponseParameters.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -123,4 +123,4 @@
 }
 
 module.exports = { ProvideResponseParameters }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_realmInfo.js.html b/docs/api/javascript/bidi_realmInfo.js.html index 60621ffa7bb12..1cbc925ffeb1c 100644 --- a/docs/api/javascript/bidi_realmInfo.js.html +++ b/docs/api/javascript/bidi_realmInfo.js.html @@ -1,6 +1,6 @@ Source: bidi/realmInfo.js
On this page

bidi_realmInfo.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_realmInfo.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -119,4 +119,4 @@
   RealmType,
   WindowRealmInfo,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_resultOwnership.js.html b/docs/api/javascript/bidi_resultOwnership.js.html index 27764bd0a7e36..aec3521a8d9f7 100644 --- a/docs/api/javascript/bidi_resultOwnership.js.html +++ b/docs/api/javascript/bidi_resultOwnership.js.html @@ -1,6 +1,6 @@ Source: bidi/resultOwnership.js
On this page

bidi_resultOwnership.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_resultOwnership.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -27,4 +27,4 @@
 }
 
 module.exports = { ResultOwnership }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_scriptManager.js.html b/docs/api/javascript/bidi_scriptManager.js.html index f16d0e12f9974..91df87512b8c3 100644 --- a/docs/api/javascript/bidi_scriptManager.js.html +++ b/docs/api/javascript/bidi_scriptManager.js.html @@ -1,6 +1,6 @@ Source: bidi/scriptManager.js
On this page

bidi_scriptManager.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_scriptManager.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -567,4 +567,4 @@
 }
 
 module.exports = getScriptManagerInstance
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_scriptTypes.js.html b/docs/api/javascript/bidi_scriptTypes.js.html index 7048204c8b591..3f4d889a894ea 100644 --- a/docs/api/javascript/bidi_scriptTypes.js.html +++ b/docs/api/javascript/bidi_scriptTypes.js.html @@ -1,6 +1,6 @@ Source: bidi/scriptTypes.js
On this page

bidi_scriptTypes.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_scriptTypes.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -94,4 +94,4 @@
 }
 
 module.exports = { Message, Source }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_storage.js.html b/docs/api/javascript/bidi_storage.js.html index 769928ef39c09..5dc8ecd1e5056 100644 --- a/docs/api/javascript/bidi_storage.js.html +++ b/docs/api/javascript/bidi_storage.js.html @@ -1,6 +1,6 @@ Source: bidi/storage.js
On this page

bidi_storage.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_storage.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -193,4 +193,4 @@
 }
 
 module.exports = getStorageInstance
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/bidi_urlPattern.js.html b/docs/api/javascript/bidi_urlPattern.js.html index 828d82b469c70..a4ec14728f507 100644 --- a/docs/api/javascript/bidi_urlPattern.js.html +++ b/docs/api/javascript/bidi_urlPattern.js.html @@ -1,6 +1,6 @@ Source: bidi/urlPattern.js
On this page

bidi_urlPattern.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

bidi_urlPattern.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -91,4 +91,4 @@
 }
 
 module.exports = { UrlPattern }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/chrome.js.html b/docs/api/javascript/chrome.js.html index 273fd201b1cdb..4ca05c17da6c4 100644 --- a/docs/api/javascript/chrome.js.html +++ b/docs/api/javascript/chrome.js.html @@ -1,6 +1,6 @@ Source: chrome.js
On this page

chrome.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

chrome.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -239,4 +239,4 @@
   Options,
   ServiceBuilder,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/chromium.js.html b/docs/api/javascript/chromium.js.html index b9bb211e21538..8c455f9148a27 100644 --- a/docs/api/javascript/chromium.js.html +++ b/docs/api/javascript/chromium.js.html @@ -1,6 +1,6 @@ Source: chromium.js
On this page

chromium.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

chromium.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -855,4 +855,4 @@
   Options,
   ServiceBuilder,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/common_driverFinder.js.html b/docs/api/javascript/common_driverFinder.js.html index a0952cec9527d..15c62724a9fa6 100644 --- a/docs/api/javascript/common_driverFinder.js.html +++ b/docs/api/javascript/common_driverFinder.js.html @@ -1,6 +1,6 @@ Source: common/driverFinder.js
On this page

common_driverFinder.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

common_driverFinder.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -76,4 +76,4 @@
 
 // PUBLIC API
 module.exports = { getBinaryPaths }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/common_seleniumManager.js.html b/docs/api/javascript/common_seleniumManager.js.html index 9df7bd794d88b..3fbf14a8ea8a5 100644 --- a/docs/api/javascript/common_seleniumManager.js.html +++ b/docs/api/javascript/common_seleniumManager.js.html @@ -1,6 +1,6 @@ Source: common/seleniumManager.js
On this page

common_seleniumManager.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

common_seleniumManager.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -115,4 +115,4 @@
 
 // PUBLIC API
 module.exports = { binaryPaths }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/createDriver-thenableWebDriverProxy.html b/docs/api/javascript/createDriver-thenableWebDriverProxy.html index 3f3f773b6a25d..2add4f405062d 100644 --- a/docs/api/javascript/createDriver-thenableWebDriverProxy.html +++ b/docs/api/javascript/createDriver-thenableWebDriverProxy.html @@ -1,3 +1,3 @@ Class: thenableWebDriverProxy
On this page

createDriver~ thenableWebDriverProxy

new thenableWebDriverProxy(sessionnon-null, …rest)

Parameters:
NameTypeAttributesDescription
sessionIThenable.<!Session>
rest?<repeatable>

Extends

Members

catch

then

Methods

(async) addCredential(credential)

Injects a credential into the authenticator.

Parameters:
NameTypeDescription
credential

Credential to be added

(async) addVirtualAuthenticator(options)

Adds a virtual authenticator with the given options.

Parameters:
NameTypeDescription
options

VirtualAuthenticatorOptions object to set authenticator options.

(async) createCDPConnection() → (non-null) {Promise.<resolved>}

Creates a new WebSocket connection.

Returns:

A new CDP instance.

Type: 
Promise.<resolved>

(async) getBidi() → {BIDI}

Initiates bidi connection using 'webSocketUrl'

Returns:
Type: 
BIDI

(async) getCredentials()

Returns:

The list of credentials owned by the authenticator.

(async) getWsUrl(debuggerAddress, target, caps) → {string}

Retrieves 'webSocketDebuggerUrl' by sending a http request using debugger address

Parameters:
NameTypeDescription
debuggerAddressstring
target
caps
Returns:

Returns parsed webSocketDebuggerUrl obtained from the http request

Type: 
string

(async) logMutationEvents(connection, callback) → {Promise.<void>}

Parameters:
NameTypeDescription
connection
callback
Returns:
Type: 
Promise.<void>

(async) normalize_(webElementPromisenon-null) → (non-null) {Promise.<!WebElement>}

Parameters:
NameTypeDescription
webElementPromisefunction

The webElement in unresolved state

Returns:

First single WebElement from array of resolved promises

Type: 
Promise.<!WebElement>

(async) onIntercept(connection, httpResponse, callback)

Handle Network interception requests

Parameters:
NameTypeDescription
connection

WebSocket connection to the browser

httpResponse

Object representing what we are intercepting as well as what should be returned.

callback

callback called when we intercept requests.

(async) onLogEvent(connection, callback) → {Promise.<void>}

Parameters:
NameTypeDescription
connection
callback
Returns:
Type: 
Promise.<void>

(async) onLogException(connection, callback) → {Promise.<void>}

Parameters:
NameTypeDescription
connection
callback
Returns:
Type: 
Promise.<void>

(async) register(username, password, connection)

Sets a listener for Fetch.authRequired event from CDP If event is triggered, it enters username and password and allows the test to move forward

Parameters:
NameTypeDescription
usernamestring
passwordstring
connection

CDP Connection

(async) removeAllCredentials()

Removes all the credentials from the authenticator.

(async) removeCredential(credential_id)

Removes a credential from the authenticator.

Parameters:
NameTypeDescription
credential_id

The ID of the credential to be removed.

(async) removeVirtualAuthenticator()

Removes a previously added virtual authenticator. The authenticator is no longer valid after removal, so no methods may be called.

(async) setUserVerified(verified)

Sets whether the authenticator will simulate success or fail on user verification.

Parameters:
NameTypeDescription
verified

true if the authenticator will pass user verification, false otherwise.

virtualAuthenticatorId()

Returns:

The value of authenticator ID added

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

createDriver~ thenableWebDriverProxy

new thenableWebDriverProxy(sessionnon-null, …rest)

Parameters:
NameTypeAttributesDescription
sessionIThenable.<!Session>
rest?<repeatable>

Extends

Members

catch

then

Methods

(async) addCredential(credential)

Injects a credential into the authenticator.

Parameters:
NameTypeDescription
credential

Credential to be added

(async) addVirtualAuthenticator(options)

Adds a virtual authenticator with the given options.

Parameters:
NameTypeDescription
options

VirtualAuthenticatorOptions object to set authenticator options.

(async) createCDPConnection() → (non-null) {Promise.<resolved>}

Creates a new WebSocket connection.

Returns:

A new CDP instance.

Type: 
Promise.<resolved>

(async) getBidi() → {BIDI}

Initiates bidi connection using 'webSocketUrl'

Returns:
Type: 
BIDI

(async) getCredentials()

Returns:

The list of credentials owned by the authenticator.

(async) getWsUrl(debuggerAddress, target, caps) → {string}

Retrieves 'webSocketDebuggerUrl' by sending a http request using debugger address

Parameters:
NameTypeDescription
debuggerAddressstring
target
caps
Returns:

Returns parsed webSocketDebuggerUrl obtained from the http request

Type: 
string

(async) logMutationEvents(connection, callback) → {Promise.<void>}

Parameters:
NameTypeDescription
connection
callback
Returns:
Type: 
Promise.<void>

(async) normalize_(webElementPromisenon-null) → (non-null) {Promise.<!WebElement>}

Parameters:
NameTypeDescription
webElementPromisefunction

The webElement in unresolved state

Returns:

First single WebElement from array of resolved promises

Type: 
Promise.<!WebElement>

(async) onIntercept(connection, httpResponse, callback)

Handle Network interception requests

Parameters:
NameTypeDescription
connection

WebSocket connection to the browser

httpResponse

Object representing what we are intercepting as well as what should be returned.

callback

callback called when we intercept requests.

(async) onLogEvent(connection, callback) → {Promise.<void>}

Parameters:
NameTypeDescription
connection
callback
Returns:
Type: 
Promise.<void>

(async) onLogException(connection, callback) → {Promise.<void>}

Parameters:
NameTypeDescription
connection
callback
Returns:
Type: 
Promise.<void>

(async) register(username, password, connection)

Sets a listener for Fetch.authRequired event from CDP If event is triggered, it enters username and password and allows the test to move forward

Parameters:
NameTypeDescription
usernamestring
passwordstring
connection

CDP Connection

(async) removeAllCredentials()

Removes all the credentials from the authenticator.

(async) removeCredential(credential_id)

Removes a credential from the authenticator.

Parameters:
NameTypeDescription
credential_id

The ID of the credential to be removed.

(async) removeVirtualAuthenticator()

Removes a previously added virtual authenticator. The authenticator is no longer valid after removal, so no methods may be called.

(async) setUserVerified(verified)

Sets whether the authenticator will simulate success or fail on user verification.

Parameters:
NameTypeDescription
verified

true if the authenticator will pass user verification, false otherwise.

virtualAuthenticatorId()

Returns:

The value of authenticator ID added

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/data/search.json b/docs/api/javascript/data/search.json index 15a6144ed97b6..5293b6530e374 100644 --- a/docs/api/javascript/data/search.json +++ b/docs/api/javascript/data/search.json @@ -1 +1 @@ -{"list":[{"title":"~resp.response.headers","link":"response.headers"},{"title":"~resp.response.statusCode","link":"response.statusCode"},{"title":"Action","link":"Action"},{"title":"Action#button","link":"button"},{"title":"Action#duration","link":"duration"},{"title":"Action#type","link":"type"},{"title":"Action#value","link":"value"},{"title":"Action#x","link":"x"},{"title":"Action#y","link":"y"},{"title":"Action.Type","link":"Type"},{"title":"Action.Type.KEY_DOWN","link":"KEY_DOWN"},{"title":"Action.Type.KEY_UP","link":"KEY_UP"},{"title":"Action.Type.PAUSE","link":"PAUSE"},{"title":"Action.Type.POINTER_CANCEL","link":"POINTER_CANCEL"},{"title":"Action.Type.POINTER_DOWN","link":"POINTER_DOWN"},{"title":"Action.Type.POINTER_MOVE","link":"POINTER_MOVE"},{"title":"Action.Type.POINTER_UP","link":"POINTER_UP"},{"title":"Action.Type.SCROLL","link":"SCROLL"},{"title":"Actions","link":"Actions"},{"title":"Actions#clear","link":"clear","description":"

Releases all keys, pointers, and clears internal state.

"},{"title":"Actions#click","link":"click","description":"

Short-hand for performing a simple left-click (down/up) with the mouse.

"},{"title":"Actions#contextClick","link":"contextClick","description":"

Short-hand for performing a simple right-click (down/up) with the mouse.

"},{"title":"Actions#doubleClick","link":"doubleClick","description":"

Short-hand for performing a double left-click with the mouse.

"},{"title":"Actions#dragAndDrop","link":"dragAndDrop","description":"

Configures a drag-and-drop action consisting of the following steps:

\n
    \n
  1. Move to the center of the from element (element to be dragged).
  2. \n
  3. Press the left mouse button.
  4. \n
  5. If the to target is a {@linkplain ./webdriver.WebElement WebElement},\nmove the mouse to its center. Otherwise, move the mouse by the\nspecified offset.
  6. \n
  7. Release the left mouse button.
  8. \n
"},{"title":"Actions#insert","link":"insert","description":"

Appends actions to the end of the current sequence for the given\ndevice. If device synchronization is enabled, after inserting the\nactions, pauses will be inserted for all other devices to ensure all action\nsequences are the same length.

"},{"title":"Actions#keyDown","link":"keyDown","description":"

Inserts an action to press a single key.

"},{"title":"Actions#keyUp","link":"keyUp","description":"

Inserts an action to release a single key.

"},{"title":"Actions#keyboard","link":"keyboard"},{"title":"Actions#mouse","link":"mouse"},{"title":"Actions#move","link":"move","description":"

Inserts an action for moving the mouse x and y pixels relative to the\nspecified origin. The origin may be defined as the mouse's\n{@linkplain ./input.Origin.POINTER current position}, the top-left corner of the\n{@linkplain ./input.Origin.VIEWPORT viewport}, or the center of a specific\n{@linkplain ./webdriver.WebElement WebElement}. Default is top left corner of the view-port if origin is not specified

\n

You may adjust how long the remote end should take, in milliseconds, to\nperform the move using the duration parameter (defaults to 100 ms).\nThe number of incremental move events generated over this duration is an\nimplementation detail for the remote end.

"},{"title":"Actions#pause","link":"pause","description":"

Inserts a pause action for the specified devices, ensuring each device is\nidle for a tick. The length of the pause (in milliseconds) may be specified\nas the first parameter to this method (defaults to 0). Otherwise, you may\njust specify the individual devices that should pause.

\n

If no devices are specified, a pause action will be created (using the same\nduration) for every device.

\n

When device synchronization is enabled (the default for new {@link Actions}\nobjects), there is no need to specify devices as pausing one automatically\npauses the others for the same duration. In other words, the following are\nall equivalent:

\n
let a1 = driver.actions();\na1.pause(100).perform();\n\nlet a2 = driver.actions();\na2.pause(100, a2.keyboard()).perform();\n// Synchronization ensures a2.mouse() is automatically paused too.\n\nlet a3 = driver.actions();\na3.pause(100, a3.keyboard(), a3.mouse()).perform();\n
\n

When device synchronization is disabled, you can cause individual devices\nto pause during a tick. For example, to hold the SHIFT key down while\nmoving the mouse:

\n
let actions = driver.actions({async: true});\n\nactions.keyDown(Key.SHIFT);\nactions.pause(actions.mouse())  // Pause for shift down\n    .press(Button.LEFT)\n    .move({x: 10, y: 10})\n    .release(Button.LEFT);\nactions\n    .pause(\n        actions.keyboard(),  // Pause for press left\n        actions.keyboard(),  // Pause for move\n        actions.keyboard())  // Pause for release left\n   .keyUp(Key.SHIFT);\nawait actions.perform();\n
"},{"title":"Actions#perform","link":"perform","description":"

Performs the configured action sequence.

"},{"title":"Actions#press","link":"press","description":"

Inserts an action to press a mouse button at the mouse's current location.

"},{"title":"Actions#release","link":"release","description":"

Inserts an action to release a mouse button at the mouse's current\nlocation.

"},{"title":"Actions#scroll","link":"scroll","description":"

scrolls a page via the coordinates given

"},{"title":"Actions#sendKeys","link":"sendKeys","description":"

Inserts a sequence of actions to type the provided key sequence.\nFor each key, this will record a pair of {@linkplain #keyDown keyDown}\nand {@linkplain #keyUp keyUp} actions. An implication of this pairing\nis that modifier keys (e.g. {@link ./input.Key.SHIFT Key.SHIFT}) will\nalways be immediately released. In other words, sendKeys(Key.SHIFT, 'a')\nis the same as typing sendKeys('a'), not sendKeys('A').

"},{"title":"Actions#synchronize","link":"synchronize","description":"

Ensures the action sequence for every device referenced in this action\nsequence is the same length. For devices whose sequence is too short,\nthis will insert {@linkplain #pause pauses} so that every device has an\nexplicit action defined at each tick.

"},{"title":"Actions#wheel","link":"wheel"},{"title":"AddInterceptParameters#urlPattern","link":"urlPattern","description":"

Adds a URL pattern to intercept.

"},{"title":"AddInterceptParameters#urlPatterns","link":"urlPatterns","description":"

Adds array of URL patterns to intercept.

"},{"title":"AddInterceptParameters#urlStringPattern","link":"urlStringPattern","description":"

Adds string URL to intercept.

"},{"title":"AddInterceptParameters#urlStringPatterns","link":"urlStringPatterns","description":"

Adds array of string URLs to intercept.

"},{"title":"Alert","link":"Alert"},{"title":"Alert#accept","link":"accept","description":"

Accepts this alert.

"},{"title":"Alert#dismiss","link":"dismiss","description":"

Dismisses this alert.

"},{"title":"Alert#getText","link":"getText","description":"

Retrieves the message text displayed with this alert. For instance, if the\nalert were opened with alert("hello"), then this would return "hello".

"},{"title":"Alert#sendKeys","link":"sendKeys","description":"

Sets the response text on this alert. This command will return an error if\nthe underlying alert does not support response text (e.g. window.alert and\nwindow.confirm).

"},{"title":"AlertPromise","link":"AlertPromise"},{"title":"AlertPromise#accept","link":"accept","description":"

Defers action until the alert has been located.

"},{"title":"AlertPromise#catch","link":"catch"},{"title":"AlertPromise#dismiss","link":"dismiss","description":"

Defers action until the alert has been located.

"},{"title":"AlertPromise#getText","link":"getText","description":"

Defer returning text until the promised alert has been resolved.

"},{"title":"AlertPromise#sendKeys","link":"sendKeys","description":"

Defers action until the alert has been located.

"},{"title":"AlertPromise#then","link":"then"},{"title":"ArgumentValue","link":"ArgumentValue"},{"title":"Atom","link":"Atom"},{"title":"Atom.FIND_ELEMENTS","link":"FIND_ELEMENTS"},{"title":"Atom.GET_ATTRIBUTE","link":"GET_ATTRIBUTE"},{"title":"Atom.IS_DISPLAYED","link":"IS_DISPLAYED"},{"title":"BaseLogEntry","link":"BaseLogEntry","description":"

Creates a new instance of BaseLogEntry.

"},{"title":"BaseLogEntry#level","link":"level","description":"

Gets the log level.

"},{"title":"BaseLogEntry#stackTrace","link":"stackTrace","description":"

Gets the log stack trace.

"},{"title":"BaseLogEntry#text","link":"text","description":"

Gets the log text.

"},{"title":"BaseLogEntry#timeStamp","link":"timeStamp","description":"

Gets the log timestamp.

"},{"title":"BaseParameters","link":"BaseParameters"},{"title":"BaseParameters#id","link":"id","description":"

Gets the browsing context ID of the network request.

"},{"title":"BaseParameters#navigation","link":"navigation","description":"

Gets the navigation information associated with the network request.

"},{"title":"BaseParameters#redirectCount","link":"redirectCount","description":"

Gets the number of redirects that occurred during the network request.

"},{"title":"BaseParameters#request","link":"request","description":"

Gets the request data for the network request.

"},{"title":"BaseParameters#timestamp","link":"timestamp","description":"

Gets the timestamp of the network request.

"},{"title":"BeforeRequestSent","link":"BeforeRequestSent"},{"title":"BeforeRequestSent#initiator","link":"initiator","description":"

Get the initiator of the request.

"},{"title":"BoxClipRectangle","link":"BoxClipRectangle","description":"

Constructs a new BoxClipRectangle object.

"},{"title":"BoxClipRectangle#asMap","link":"asMap","description":"

Converts the BoxClipRectangle object to a Map.

"},{"title":"Browser","link":"Browser"},{"title":"Browser","link":"Browser","description":"

Recognized browser names.

"},{"title":"Browser#createUserContext","link":"createUserContext","description":"

Creates a new user context.

"},{"title":"Browser#getUserContexts","link":"getUserContexts","description":"

Gets the list of all user contexts.

"},{"title":"Browser#removeUserContext","link":"removeUserContext","description":"

Removes a user context.

"},{"title":"Browser.CHROME","link":"CHROME"},{"title":"Browser.EDGE","link":"EDGE"},{"title":"Browser.FIREFOX","link":"FIREFOX"},{"title":"Browser.INTERNET_EXPLORER","link":"INTERNET_EXPLORER"},{"title":"Browser.SAFARI","link":"SAFARI"},{"title":"BrowsingContext","link":"BrowsingContext"},{"title":"BrowsingContext#activate","link":"activate","description":"

Activates and focuses the top-level browsing context.

"},{"title":"BrowsingContext#back","link":"back","description":"

Navigates the browsing context to the previous page in the history.

"},{"title":"BrowsingContext#captureElementScreenshot","link":"captureElementScreenshot","description":"

Captures a screenshot of a specific element within the browsing context.

"},{"title":"BrowsingContext#captureScreenshot","link":"captureScreenshot","description":"

Captures a screenshot of the browsing context.

"},{"title":"BrowsingContext#close","link":"close","description":"

Closes the browsing context

"},{"title":"BrowsingContext#create","link":"create","description":"

Creates a browsing context for the given type with the given parameters

"},{"title":"BrowsingContext#forward","link":"forward","description":"

Moves the browsing context forward by one step in the history.

"},{"title":"BrowsingContext#getTopLevelContexts","link":"getTopLevelContexts"},{"title":"BrowsingContext#getTree","link":"getTree"},{"title":"BrowsingContext#handleUserPrompt","link":"handleUserPrompt","description":"

Handles a user prompt in the browsing context.

"},{"title":"BrowsingContext#id","link":"id"},{"title":"BrowsingContext#locateNode","link":"locateNode","description":"

Locates a single node in the browsing context.

"},{"title":"BrowsingContext#locateNodes","link":"locateNodes","description":"

Locates nodes in the browsing context.

"},{"title":"BrowsingContext#navigate","link":"navigate"},{"title":"BrowsingContext#printPage","link":"printPage","description":"

Prints PDF of the webpage

"},{"title":"BrowsingContext#reload","link":"reload","description":"

Reloads the current browsing context.

"},{"title":"BrowsingContext#setViewport","link":"setViewport","description":"

Sets the viewport size and device pixel ratio for the browsing context.

"},{"title":"BrowsingContext#traverseHistory","link":"traverseHistory","description":"

Traverses the browsing context history by a given delta.

"},{"title":"BrowsingContextInfo","link":"BrowsingContextInfo"},{"title":"BrowsingContextInfo#children","link":"children","description":"

Get the children of the browsing context.

"},{"title":"BrowsingContextInfo#id","link":"id","description":"

Get the ID of the browsing context.

"},{"title":"BrowsingContextInfo#parentBrowsingContext","link":"parentBrowsingContext","description":"

Get the parent browsing context.

"},{"title":"BrowsingContextInfo#url","link":"url","description":"

Get the URL of the browsing context.

"},{"title":"BrowsingContextInspector","link":"BrowsingContextInspector"},{"title":"BrowsingContextInspector#onBrowsingContextCreated","link":"onBrowsingContextCreated","description":"

Subscribes to the 'browsingContext.contextCreated' event.

"},{"title":"BrowsingContextInspector#onBrowsingContextDestroyed","link":"onBrowsingContextDestroyed","description":"

Subscribes to the 'browsingContext.contextDestroyed' event.

"},{"title":"BrowsingContextInspector#onBrowsingContextLoaded","link":"onBrowsingContextLoaded","description":"

Subscribes to the 'browsingContext.load' event.

"},{"title":"BrowsingContextInspector#onDomContentLoaded","link":"onDomContentLoaded","description":"

Subscribes to the 'browsingContext.domContentLoaded' event.

"},{"title":"BrowsingContextInspector#onFragmentNavigated","link":"onFragmentNavigated","description":"

Subscribes to the 'browsingContext.fragmentNavigated' event.

"},{"title":"BrowsingContextInspector#onNavigationStarted","link":"onNavigationStarted","description":"

Subscribe to the 'browsingContext.navigationStarted' event.

"},{"title":"BrowsingContextInspector#onUserPromptClosed","link":"onUserPromptClosed","description":"

Subscribes to the 'browsingContext.userPromptClosed' event.

"},{"title":"BrowsingContextInspector#onUserPromptOpened","link":"onUserPromptOpened","description":"

Subscribes to the 'browsingContext.userPromptOpened' event.

"},{"title":"BrowsingContextPartitionDescriptor","link":"BrowsingContextPartitionDescriptor"},{"title":"Build","link":"Build"},{"title":"Build#go","link":"go","description":"

Executes the build.

"},{"title":"Build#onlyOnce","link":"onlyOnce","description":"

Configures this build to only execute if it has not previously been\nrun during the life of the current process.

"},{"title":"Builder","link":"Builder"},{"title":"Builder#build","link":"build","description":"

Creates a new WebDriver client based on this builder's current\nconfiguration.

\n

This method will return a {@linkplain ThenableWebDriver} instance, allowing\nusers to issue commands directly without calling then(). The returned\nthenable wraps a promise that will resolve to a concrete\n{@linkplain webdriver.WebDriver WebDriver} instance. The promise will be\nrejected if the remote end fails to create a new session.

"},{"title":"Builder#disableEnvironmentOverrides","link":"disableEnvironmentOverrides","description":"

Configures this builder to ignore any environment variable overrides and to\nonly use the configuration specified through this instance's API.

"},{"title":"Builder#forBrowser","link":"forBrowser","description":"

Configures the target browser for clients created by this instance.\nAny calls to {@link #withCapabilities} after this function will\noverwrite these settings.

\n

You may also define the target browser using the {@code SELENIUM_BROWSER}\nenvironment variable. If set, this environment variable should be of the\nform browser[:[version][:platform]].

"},{"title":"Builder#getCapabilities","link":"getCapabilities","description":"

Returns the base set of capabilities this instance is currently configured\nto use.

"},{"title":"Builder#getChromeOptions","link":"getChromeOptions"},{"title":"Builder#getFirefoxOptions","link":"getFirefoxOptions"},{"title":"Builder#getHttpAgent","link":"getHttpAgent"},{"title":"Builder#getSafariOptions","link":"getSafariOptions"},{"title":"Builder#getServerUrl","link":"getServerUrl"},{"title":"Builder#getWebDriverProxy","link":"getWebDriverProxy"},{"title":"Builder#setAlertBehavior","link":"setAlertBehavior","description":"

Sets the default action to take with an unexpected alert before returning\nan error.

"},{"title":"Builder#setCapability","link":"setCapability","description":"

Sets the desired capability when requesting a new session.\nIf there is already a capability named key, its value will be overwritten with value.\nThis is a convenience wrapper around builder.getCapabilities().set(key, value) to support Builder method chaining.

"},{"title":"Builder#setChromeOptions","link":"setChromeOptions","description":"

Sets Chrome specific {@linkplain chrome.Options options} for drivers\ncreated by this builder. Any logging or proxy settings defined on the given\noptions will take precedence over those set through\n{@link #setLoggingPrefs} and {@link #setProxy}, respectively.

"},{"title":"Builder#setChromeService","link":"setChromeService","description":"

Sets the service builder to use for managing the chromedriver child process\nwhen creating new Chrome sessions.

"},{"title":"Builder#setEdgeOptions","link":"setEdgeOptions","description":"

Set {@linkplain edge.Options options} specific to Microsoft's Edge browser\nfor drivers created by this builder. Any proxy settings defined on the\ngiven options will take precedence over those set through\n{@link #setProxy}.

"},{"title":"Builder#setEdgeService","link":"setEdgeService","description":"

Sets the {@link edge.ServiceBuilder} to use to manage the\nMicrosoftEdgeDriver child process when creating sessions locally.

"},{"title":"Builder#setFirefoxOptions","link":"setFirefoxOptions","description":"

Sets Firefox specific {@linkplain firefox.Options options} for drivers\ncreated by this builder. Any logging or proxy settings defined on the given\noptions will take precedence over those set through\n{@link #setLoggingPrefs} and {@link #setProxy}, respectively.

"},{"title":"Builder#setFirefoxService","link":"setFirefoxService","description":"

Sets the {@link firefox.ServiceBuilder} to use to manage the geckodriver\nchild process when creating Firefox sessions locally.

"},{"title":"Builder#setIeOptions","link":"setIeOptions","description":"

Set Internet Explorer specific {@linkplain ie.Options options} for drivers\ncreated by this builder. Any proxy settings defined on the given options\nwill take precedence over those set through {@link #setProxy}.

"},{"title":"Builder#setIeService","link":"setIeService","description":"

Sets the {@link ie.ServiceBuilder} to use to manage the geckodriver\nchild process when creating IE sessions locally.

"},{"title":"Builder#setLoggingPrefs","link":"setLoggingPrefs","description":"

Sets the logging preferences for the created session. Preferences may be\nchanged by repeated calls, or by calling {@link #withCapabilities}.

"},{"title":"Builder#setProxy","link":"setProxy","description":"

Sets the proxy configuration for the target browser.\nAny calls to {@link #withCapabilities} after this function will\noverwrite these settings.

"},{"title":"Builder#setSafariOptions","link":"setSafariOptions","description":"

Sets Safari specific {@linkplain safari.Options options} for drivers\ncreated by this builder. Any logging settings defined on the given options\nwill take precedence over those set through {@link #setLoggingPrefs}.

"},{"title":"Builder#usingHttpAgent","link":"usingHttpAgent","description":"

Sets the http agent to use for each request.\nIf this method is not called, the Builder will use http.globalAgent by default.

"},{"title":"Builder#usingServer","link":"usingServer","description":"

Sets the URL of a remote WebDriver server to use. Once a remote URL has\nbeen specified, the builder direct all new clients to that server. If this\nmethod is never called, the Builder will attempt to create all clients\nlocally.

\n

As an alternative to this method, you may also set the\nSELENIUM_REMOTE_URL environment variable.

"},{"title":"Builder#usingWebDriverProxy","link":"usingWebDriverProxy","description":"

Sets the URL of the proxy to use for the WebDriver's HTTP connections.\nIf this method is never called, the Builder will create a connection\nwithout a proxy.

"},{"title":"Builder#withCapabilities","link":"withCapabilities","description":"

Recommended way is to use set*Options where * is the browser(eg setChromeOptions)

\n

Sets the desired capabilities when requesting a new session. This will\noverwrite any previously set capabilities.

"},{"title":"Button","link":"Button","description":"

Enumeration of the buttons used in the advanced interactions API.

"},{"title":"Button.BACK","link":"BACK"},{"title":"Button.FORWARD","link":"FORWARD"},{"title":"Button.LEFT","link":"LEFT"},{"title":"Button.MIDDLE","link":"MIDDLE"},{"title":"Button.RIGHT","link":"RIGHT"},{"title":"By","link":"By"},{"title":"By#toString","link":"toString"},{"title":"By#using","link":"using"},{"title":"By#value","link":"value"},{"title":"By.className","link":"className","description":"

Locates elements that have a specific class name.

"},{"title":"By.css","link":"css","description":"

Locates elements using a CSS selector.

"},{"title":"By.id","link":"id","description":"

Locates elements by the ID attribute. This locator uses the CSS selector\n*[id="$ID"], not document.getElementById.

"},{"title":"By.js","link":"js","description":"

Locates elements by evaluating a script that defines the body of\na {@linkplain webdriver.WebDriver#executeScript JavaScript function}.\nThe return value of this function must be an element or an array-like\nlist of elements. When this locator returns a list of elements, but only\none is expected, the first element in this list will be used as the\nsingle element value.

"},{"title":"By.linkText","link":"linkText","description":"

Locates link elements whose\n{@linkplain webdriver.WebElement#getText visible text} matches the given\nstring.

"},{"title":"By.name","link":"name","description":"

Locates elements whose name attribute has the given value.

"},{"title":"By.partialLinkText","link":"partialLinkText","description":"

Locates link elements whose\n{@linkplain webdriver.WebElement#getText visible text} contains the given\nsubstring.

"},{"title":"By.tagName","link":"tagName","description":"

Locates elements with a given tag name.

"},{"title":"By.xpath","link":"xpath","description":"

Locates elements matching a XPath selector. Care should be taken when\nusing an XPath selector with a {@link webdriver.WebElement} as WebDriver\nwill respect the context in the specified in the selector. For example,\ngiven the selector //div, WebDriver will search from the document root\nregardless of whether the locator was used with a WebElement.

"},{"title":"ByHash","link":"ByHash","description":"

Short-hand expressions for the primary element locator strategies.\nFor example the following two statements are equivalent:

\n
var e1 = driver.findElement(By.id('foo'));\nvar e2 = driver.findElement({id: 'foo'});\n
\n

Care should be taken when using JavaScript minifiers (such as the\nClosure compiler), as locator hashes will always be parsed using\nthe un-obfuscated properties listed.

"},{"title":"BytesValue","link":"BytesValue","description":"

Creates a new BytesValue instance.

"},{"title":"BytesValue#asMap","link":"asMap","description":"

Converts the BytesValue to a map.

"},{"title":"BytesValue#type","link":"type","description":"

Gets the type of the BytesValue.

"},{"title":"BytesValue#value","link":"value","description":"

Gets the value of the BytesValue.

"},{"title":"Capabilities","link":"Capabilities"},{"title":"Capabilities#Symbols.serialize","link":"serialize"},{"title":"Capabilities#delete","link":"delete","description":"

Deletes an entry from this set of capabilities.

"},{"title":"Capabilities#get","link":"get"},{"title":"Capabilities#getAcceptInsecureCerts","link":"getAcceptInsecureCerts"},{"title":"Capabilities#getAlertBehavior","link":"getAlertBehavior"},{"title":"Capabilities#getBrowserName","link":"getBrowserName"},{"title":"Capabilities#getBrowserVersion","link":"getBrowserVersion"},{"title":"Capabilities#getPageLoadStrategy","link":"getPageLoadStrategy","description":"

Returns the configured page load strategy.

"},{"title":"Capabilities#getPlatform","link":"getPlatform"},{"title":"Capabilities#getProxy","link":"getProxy"},{"title":"Capabilities#has","link":"has"},{"title":"Capabilities#keys","link":"keys"},{"title":"Capabilities#merge","link":"merge","description":"

Merges another set of capabilities into this instance.

"},{"title":"Capabilities#set","link":"set"},{"title":"Capabilities#setAcceptInsecureCerts","link":"setAcceptInsecureCerts","description":"

Sets whether a WebDriver session should implicitly accept self-signed, or\nother untrusted TLS certificates on navigation.

"},{"title":"Capabilities#setAlertBehavior","link":"setAlertBehavior","description":"

Sets the default action to take with an unexpected alert before returning\nan error. If unspecified, WebDriver will default to\n{@link UserPromptHandler.DISMISS_AND_NOTIFY}.

"},{"title":"Capabilities#setBrowserName","link":"setBrowserName","description":"

Sets the name of the target browser.

"},{"title":"Capabilities#setBrowserVersion","link":"setBrowserVersion","description":"

Sets the desired version of the target browser.

"},{"title":"Capabilities#setLoggingPrefs","link":"setLoggingPrefs","description":"

Sets the logging preferences. Preferences may be specified as a\n{@link ./logging.Preferences} instance, or as a map of log-type to\nlog-level.

"},{"title":"Capabilities#setPageLoadStrategy","link":"setPageLoadStrategy","description":"

Sets the desired page loading strategy for a new WebDriver session.

"},{"title":"Capabilities#setPlatform","link":"setPlatform","description":"

Sets the target platform.

"},{"title":"Capabilities#setProxy","link":"setProxy","description":"

Sets the proxy configuration for this instance.

"},{"title":"Capabilities#setStrictFileInteractability","link":"setStrictFileInteractability","description":"

Sets the boolean flag configuration for this instance.

"},{"title":"Capabilities#size","link":"size"},{"title":"Capabilities.chrome","link":"chrome"},{"title":"Capabilities.edge","link":"edge"},{"title":"Capabilities.firefox","link":"firefox"},{"title":"Capabilities.ie","link":"ie"},{"title":"Capabilities.safari","link":"safari"},{"title":"Capability","link":"Capability","description":"

The standard WebDriver capability keys.

"},{"title":"Capability.ACCEPT_INSECURE_TLS_CERTS","link":"ACCEPT_INSECURE_TLS_CERTS","description":"

Indicates whether a WebDriver session implicitly trusts otherwise untrusted\nand self-signed TLS certificates during navigation.

"},{"title":"Capability.BROWSER_NAME","link":"BROWSER_NAME","description":"

The browser name. Common browser names are defined in the\n{@link ./capabilities.Browser Browser} enum.

"},{"title":"Capability.BROWSER_VERSION","link":"BROWSER_VERSION","description":"

Identifies the browser version.

"},{"title":"Capability.ENABLE_DOWNLOADS","link":"ENABLE_DOWNLOADS"},{"title":"Capability.LOGGING_PREFS","link":"LOGGING_PREFS","description":"

Key for the logging driver logging preferences.\nThe browser name. Common browser names are defined in the\n{@link ./capabilities.Browser Browser} enum.

"},{"title":"Capability.PAGE_LOAD_STRATEGY","link":"PAGE_LOAD_STRATEGY","description":"

Defines the session's\n{@linkplain ./capabilities.PageLoadStrategy page loading strategy}.

"},{"title":"Capability.PLATFORM_NAME","link":"PLATFORM_NAME","description":"

Identifies the operating system of the endpoint node. Common values\nrecognized by the most WebDriver server implementations are predefined in\nthe {@link ./capabilities.Platform Platform} enum.

"},{"title":"Capability.PROXY","link":"PROXY","description":"

Describes the proxy configuration to use for a new WebDriver session.

"},{"title":"Capability.SET_WINDOW_RECT","link":"SET_WINDOW_RECT","description":"

Indicates whether the remote end supports all of the window resizing and\npositioning commands:

\n
    \n
  • {@linkplain ./webdriver.Window#getRect Window.getRect()}
  • \n
  • {@linkplain ./webdriver.Window#setRect Window.setRect()}
  • \n
  • {@linkplain ./webdriver.Window#maximize Window.maximize()}
  • \n
  • {@linkplain ./webdriver.Window#minimize Window.minimize()}
  • \n
  • {@linkplain ./webdriver.Window#fullscreen Window.fullscreen()}
  • \n
"},{"title":"Capability.STRICT_FILE_INTERACTABILITY","link":"STRICT_FILE_INTERACTABILITY","description":"

Defines the current session’s strict file interactability.\nUsed to upload a file when strict file interactability is on

"},{"title":"Capability.TIMEOUTS","link":"TIMEOUTS","description":"

Describes the {@linkplain ./capabilities.Timeouts timeouts} imposed on\ncertain session operations.

"},{"title":"Capability.UNHANDLED_PROMPT_BEHAVIOR","link":"UNHANDLED_PROMPT_BEHAVIOR","description":"

Defines how a WebDriver session should\n{@linkplain ./capabilities.UserPromptHandler respond} to unhandled user\nprompts.

"},{"title":"CaptureScreenshotParameters","link":"CaptureScreenshotParameters"},{"title":"CaptureScreenshotParameters#clipRectangle","link":"clipRectangle","description":"

Sets the clip rectangle for capturing a screenshot.

"},{"title":"CaptureScreenshotParameters#imageFormat","link":"imageFormat","description":"

Sets the image format and quality for capturing a screenshot.

"},{"title":"CaptureScreenshotParameters#origin","link":"origin","description":"

Sets the origin for capturing the screenshot.

"},{"title":"ChannelValue","link":"ChannelValue"},{"title":"Client","link":"Client"},{"title":"Client#send","link":"send","description":"

Sends a request to the server. The client will automatically follow any\nredirects returned by the server, fulfilling the returned promise with the\nfinal response.

"},{"title":"ClipRectangle","link":"ClipRectangle","description":"

Constructs a new ClipRectangle object.

"},{"title":"ClipRectangle#type","link":"type","description":"

Gets the type of the clip rectangle.

"},{"title":"Command","link":"Command"},{"title":"Command","link":"Command"},{"title":"Command#getName","link":"getName"},{"title":"Command#getParameter","link":"getParameter","description":"

Returns a named command parameter.

"},{"title":"Command#getParameters","link":"getParameters"},{"title":"Command#kill","link":"kill","description":"

Sends a signal to the underlying process.

"},{"title":"Command#result","link":"result"},{"title":"Command#setParameter","link":"setParameter","description":"

Sets a parameter to send with this command.

"},{"title":"Command#setParameters","link":"setParameters","description":"

Sets the parameters for this command.

"},{"title":"CommandLineFlag","link":"CommandLineFlag"},{"title":"CommandSpec","link":"CommandSpec"},{"title":"CommandTransformer","link":"CommandTransformer"},{"title":"Condition","link":"Condition"},{"title":"Condition#description","link":"description"},{"title":"Condition#fn","link":"fn"},{"title":"Config","link":"Config","description":"

Describes how a proxy should be configured for a WebDriver session.

"},{"title":"Config","link":"Config"},{"title":"Config#proxyType","link":"proxyType","description":"

The proxy type.

"},{"title":"ConsoleLogEntry","link":"ConsoleLogEntry"},{"title":"ConsoleLogEntry#args","link":"args","description":"

Gets the arguments associated with the log entry.

"},{"title":"ConsoleLogEntry#method","link":"method","description":"

Gets the method associated with the log entry.

"},{"title":"ContinueRequestParameters","link":"ContinueRequestParameters"},{"title":"ContinueRequestParameters#body","link":"body","description":"

Sets the body value for the request.

"},{"title":"ContinueRequestParameters#cookies","link":"cookies","description":"

Sets the cookies for the request.

"},{"title":"ContinueRequestParameters#headers","link":"headers","description":"

Sets the headers for the request.

"},{"title":"ContinueRequestParameters#method","link":"method","description":"

Sets the HTTP method for the request.

"},{"title":"ContinueRequestParameters#url","link":"url","description":"

Sets the URL for the request.

"},{"title":"ContinueResponseParameters","link":"ContinueResponseParameters"},{"title":"ContinueResponseParameters#cookies","link":"cookies","description":"

Sets the cookies for the response.

"},{"title":"ContinueResponseParameters#credentials","link":"credentials","description":"

Sets the credentials for authentication.

"},{"title":"ContinueResponseParameters#headers","link":"headers","description":"

Sets the headers for the response.

"},{"title":"ContinueResponseParameters#reasonPhrase","link":"reasonPhrase","description":"

Sets the reason phrase for the response.

"},{"title":"ContinueResponseParameters#statusCode","link":"statusCode","description":"

Sets the status code for the response.

"},{"title":"Cookie","link":"Cookie"},{"title":"Cookie#domain","link":"domain","description":"

Gets the domain of the cookie.

"},{"title":"Cookie#expires","link":"expires","description":"

Gets the expiration date of the cookie.

"},{"title":"Cookie#httpOnly","link":"httpOnly","description":"

Checks if the cookie is HTTP-only.

"},{"title":"Cookie#name","link":"name","description":"

Gets the name of the cookie.

"},{"title":"Cookie#path","link":"path","description":"

Gets the path of the cookie.

"},{"title":"Cookie#sameSite","link":"sameSite","description":"

Gets the same-site attribute of the cookie.

"},{"title":"Cookie#secure","link":"secure","description":"

Checks if the cookie is secure.

"},{"title":"Cookie#size","link":"size","description":"

Gets the size of the cookie.

"},{"title":"Cookie#value","link":"value","description":"

Gets the value of the cookie.

"},{"title":"CookieFilter","link":"CookieFilter"},{"title":"CookieFilter#domain","link":"domain","description":"

Sets the domain for the cookie.

"},{"title":"CookieFilter#expiry","link":"expiry","description":"

Sets the expiry value.

"},{"title":"CookieFilter#httpOnly","link":"httpOnly","description":"

Sets the httpOnly flag for the cookie filter.

"},{"title":"CookieFilter#name","link":"name","description":"

Sets the name of the cookie.

"},{"title":"CookieFilter#path","link":"path","description":"

Sets the url path for the cookie to be fetched.

"},{"title":"CookieFilter#sameSite","link":"sameSite","description":"

Sets the SameSite attribute for the cookie.

"},{"title":"CookieFilter#secure","link":"secure","description":"

Sets the flag to fetch secure cookies.

"},{"title":"CookieFilter#size","link":"size","description":"

Sets the size of the cookie to be fetched.

"},{"title":"CookieFilter#value","link":"value","description":"

Sets the value of the cookie.

"},{"title":"CreateContextParameters","link":"CreateContextParameters"},{"title":"CreateContextParameters#background","link":"background","description":"

Sets the background parameter.

"},{"title":"CreateContextParameters#referenceContext","link":"referenceContext","description":"

Sets the reference context.

"},{"title":"CreateContextParameters#userContext","link":"userContext","description":"

Sets the user context.

"},{"title":"Credential","link":"Credential"},{"title":"Credential#createNonResidentCredential","link":"createNonResidentCredential","description":"

Creates a non-resident (i.e. stateless) credential.

"},{"title":"Credential#createResidentCredential","link":"createResidentCredential","description":"

Creates a resident (i.e. stateless) credential.

"},{"title":"Credential#fromDict","link":"fromDict","description":"

Creates a credential from a map.

"},{"title":"DetachedShadowRootError","link":"DetachedShadowRootError"},{"title":"Device","link":"Device"},{"title":"Device#toJSON","link":"toJSON"},{"title":"Device.Type","link":"Type","description":"

Device types supported by the WebDriver protocol.

"},{"title":"Device.Type.KEY","link":"KEY"},{"title":"Device.Type.NONE","link":"NONE"},{"title":"Device.Type.POINTER","link":"POINTER"},{"title":"Device.Type.WHEEL","link":"WHEEL"},{"title":"DriverService","link":"DriverService"},{"title":"DriverService#address","link":"address"},{"title":"DriverService#isRunning","link":"isRunning","description":"

Returns whether the underlying process is still running. This does not take\ninto account whether the process is in the process of shutting down.

"},{"title":"DriverService#kill","link":"kill","description":"

Stops the service if it is not currently running. This function will kill\nthe server immediately. To synchronize with the active control flow, use\n{@link #stop()}.

"},{"title":"DriverService#start","link":"start","description":"

Starts the server if it is not already running.

"},{"title":"DriverService.Builder","link":"Builder"},{"title":"DriverService.Builder#addArguments","link":"addArguments","description":"

Define additional command line arguments to use when starting the server.

"},{"title":"DriverService.Builder#build","link":"build","description":"

Creates a new DriverService using this instance's current configuration.

"},{"title":"DriverService.Builder#setEnvironment","link":"setEnvironment","description":"

Defines the environment to start the server under. This setting will be\ninherited by every browser session started by the server. By default, the\nserver will inherit the enviroment of the current process.

"},{"title":"DriverService.Builder#setHostname","link":"setHostname","description":"

Sets the host name to access the server on. If specified, the\n{@linkplain #setLoopback() loopback} setting will be ignored.

"},{"title":"DriverService.Builder#setLoopback","link":"setLoopback","description":"

Sets whether the service should be accessed at this host's loopback\naddress.

"},{"title":"DriverService.Builder#setPath","link":"setPath","description":"

Sets the base path for WebDriver REST commands (e.g. "/wd/hub").\nBy default, the driver will accept commands relative to "/".

"},{"title":"DriverService.Builder#setPort","link":"setPort","description":"

Sets the port to start the server on.

"},{"title":"DriverService.Builder#setStdio","link":"setStdio","description":"

IO configuration for the spawned server process. For more information,\nrefer to the documentation of child_process.spawn.

"},{"title":"DriverService.DEFAULT_START_TIMEOUT_MS","link":"DEFAULT_START_TIMEOUT_MS","description":"

The default amount of time, in milliseconds, to wait for the server to\nstart.

"},{"title":"ElementClickInterceptedError","link":"ElementClickInterceptedError"},{"title":"ElementClipRectangle","link":"ElementClipRectangle","description":"

Constructs a new ElementClipRectangle instance.

"},{"title":"ElementClipRectangle#asMap","link":"asMap","description":"

Converts the ElementClipRectangle instance to a map.

"},{"title":"ElementNotInteractableError","link":"ElementNotInteractableError"},{"title":"ElementNotSelectableError","link":"ElementNotSelectableError"},{"title":"Entry","link":"Entry"},{"title":"Entry#toJSON","link":"toJSON"},{"title":"Environment","link":"Environment"},{"title":"Environment#browser","link":"browser"},{"title":"Environment#browsers","link":"browsers","description":"

Returns a predicate function that will suppress tests in this environment\nif the {@linkplain #browser current browser} is in the list of\nbrowsersToIgnore.

"},{"title":"Environment#builder","link":"builder"},{"title":"ErrorCode","link":"ErrorCode","description":"

Enum of legacy error codes.\nTODO: remove this when all code paths have been switched to the new error\ntypes.

"},{"title":"ErrorCode.ELEMENT_CLICK_INTERCEPTED","link":"ELEMENT_CLICK_INTERCEPTED"},{"title":"ErrorCode.ELEMENT_NOT_INTERACTABLE","link":"ELEMENT_NOT_INTERACTABLE"},{"title":"ErrorCode.ELEMENT_NOT_SELECTABLE","link":"ELEMENT_NOT_SELECTABLE"},{"title":"ErrorCode.ELEMENT_NOT_VISIBLE","link":"ELEMENT_NOT_VISIBLE"},{"title":"ErrorCode.IME_ENGINE_ACTIVATION_FAILED","link":"IME_ENGINE_ACTIVATION_FAILED"},{"title":"ErrorCode.IME_NOT_AVAILABLE","link":"IME_NOT_AVAILABLE"},{"title":"ErrorCode.INVALID_ARGUMENT","link":"INVALID_ARGUMENT"},{"title":"ErrorCode.INVALID_COOKIE_DOMAIN","link":"INVALID_COOKIE_DOMAIN"},{"title":"ErrorCode.INVALID_ELEMENT_COORDINATES","link":"INVALID_ELEMENT_COORDINATES"},{"title":"ErrorCode.INVALID_ELEMENT_STATE","link":"INVALID_ELEMENT_STATE"},{"title":"ErrorCode.INVALID_SELECTOR_ERROR","link":"INVALID_SELECTOR_ERROR"},{"title":"ErrorCode.INVALID_XPATH_SELECTOR","link":"INVALID_XPATH_SELECTOR"},{"title":"ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPE","link":"INVALID_XPATH_SELECTOR_RETURN_TYPE"},{"title":"ErrorCode.JAVASCRIPT_ERROR","link":"JAVASCRIPT_ERROR"},{"title":"ErrorCode.METHOD_NOT_ALLOWED","link":"METHOD_NOT_ALLOWED"},{"title":"ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS","link":"MOVE_TARGET_OUT_OF_BOUNDS"},{"title":"ErrorCode.NO_SUCH_ALERT","link":"NO_SUCH_ALERT"},{"title":"ErrorCode.NO_SUCH_COOKIE","link":"NO_SUCH_COOKIE"},{"title":"ErrorCode.NO_SUCH_ELEMENT","link":"NO_SUCH_ELEMENT"},{"title":"ErrorCode.NO_SUCH_FRAME","link":"NO_SUCH_FRAME"},{"title":"ErrorCode.NO_SUCH_SESSION","link":"NO_SUCH_SESSION"},{"title":"ErrorCode.NO_SUCH_WINDOW","link":"NO_SUCH_WINDOW"},{"title":"ErrorCode.SCRIPT_TIMEOUT","link":"SCRIPT_TIMEOUT"},{"title":"ErrorCode.SESSION_NOT_CREATED","link":"SESSION_NOT_CREATED"},{"title":"ErrorCode.SQL_DATABASE_ERROR","link":"SQL_DATABASE_ERROR"},{"title":"ErrorCode.STALE_ELEMENT_REFERENCE","link":"STALE_ELEMENT_REFERENCE"},{"title":"ErrorCode.SUCCESS","link":"SUCCESS"},{"title":"ErrorCode.TIMEOUT","link":"TIMEOUT"},{"title":"ErrorCode.UNABLE_TO_CAPTURE_SCREEN","link":"UNABLE_TO_CAPTURE_SCREEN"},{"title":"ErrorCode.UNABLE_TO_SET_COOKIE","link":"UNABLE_TO_SET_COOKIE"},{"title":"ErrorCode.UNEXPECTED_ALERT_OPEN","link":"UNEXPECTED_ALERT_OPEN"},{"title":"ErrorCode.UNKNOWN_COMMAND","link":"UNKNOWN_COMMAND"},{"title":"ErrorCode.UNKNOWN_ERROR","link":"UNKNOWN_ERROR"},{"title":"ErrorCode.UNSUPPORTED_OPERATION","link":"UNSUPPORTED_OPERATION"},{"title":"ErrorCode.XPATH_LOOKUP_ERROR","link":"XPATH_LOOKUP_ERROR"},{"title":"EvaluateResultException","link":"EvaluateResultException"},{"title":"EvaluateResultSuccess","link":"EvaluateResultSuccess"},{"title":"EvaluateResultType","link":"EvaluateResultType","description":"

Represents the type of script evaluation result.\nDescribed in https://w3c.github.io/webdriver-bidi/#type-script-EvaluateResult.

"},{"title":"EvaluateResultType.EXCEPTION","link":"EXCEPTION"},{"title":"EvaluateResultType.SUCCESS","link":"SUCCESS"},{"title":"ExceptionDetails","link":"ExceptionDetails"},{"title":"Executor","link":"Executor"},{"title":"Executor","link":"Executor"},{"title":"Executor#defineCommand","link":"defineCommand","description":"

Defines a new command for use with this executor. When a command is sent,\nthe {@code path} will be preprocessed using the command's parameters; any\npath segments prefixed with ":" will be replaced by the parameter of the\nsame name. For example, given "/person/:name" and the parameters\n"{name: 'Bob'}", the final command path will be "/person/Bob".

"},{"title":"Executor#execute","link":"execute","description":"

Executes the given {@code command}. If there is an error executing the\ncommand, the provided callback will be invoked with the offending error.\nOtherwise, the callback will be invoked with a null Error and non-null\nresponse object.

"},{"title":"Executor#execute","link":"execute"},{"title":"FetchError","link":"FetchError","description":"

Creates a new FetchError instance.

"},{"title":"FetchError#errorText","link":"errorText","description":"

Gets the error text.

"},{"title":"FetchTimingInfo","link":"FetchTimingInfo"},{"title":"FetchTimingInfo#connectEnd","link":"connectEnd","description":"

Gets the timestamp when the connection ended.

"},{"title":"FetchTimingInfo#connectStart","link":"connectStart","description":"

Gets the timestamp when the connection started.

"},{"title":"FetchTimingInfo#dnsEnd","link":"dnsEnd","description":"

Gets the timestamp when the domain lookup ended.

"},{"title":"FetchTimingInfo#dnsStart","link":"dnsStart","description":"

Gets the timestamp when the domain lookup started.

"},{"title":"FetchTimingInfo#fetchStart","link":"fetchStart","description":"

Gets the timestamp when the fetch started.

"},{"title":"FetchTimingInfo#originTime","link":"originTime","description":"

Gets the origin time.

"},{"title":"FetchTimingInfo#redirectEnd","link":"redirectEnd","description":"

Gets the timestamp when the redirect ended.

"},{"title":"FetchTimingInfo#redirectStart","link":"redirectStart","description":"

Gets the timestamp when the redirect started.

"},{"title":"FetchTimingInfo#requestStart","link":"requestStart","description":"

Gets the timestamp when the request started.

"},{"title":"FetchTimingInfo#requestTime","link":"requestTime","description":"

Get the request time.

"},{"title":"FetchTimingInfo#responseEnd","link":"responseEnd","description":"

Gets the timestamp when the response ended.

"},{"title":"FetchTimingInfo#responseStart","link":"responseStart","description":"

Gets the timestamp when the response started.

"},{"title":"FetchTimingInfo#tlsStart","link":"tlsStart","description":"

Gets the timestamp when the secure connection started.

"},{"title":"FileDetector","link":"FileDetector"},{"title":"FileDetector","link":"FileDetector"},{"title":"FileDetector#handleFile","link":"handleFile","description":"

Handles the file specified by the given path, preparing it for use with\nthe current browser. If the path does not refer to a valid file, it will\nbe returned unchanged, otherwise a path suitable for use with the current\nbrowser will be returned.

\n

This default implementation is a no-op. Subtypes may override this function\nfor custom tailored file handling.

"},{"title":"FileDetector#handleFile","link":"handleFile","description":"

Prepares a file for use with the remote browser. If the provided path\ndoes not reference a normal file (i.e. it does not exist or is a\ndirectory), then the promise returned by this method will be resolved with\nthe original file path. Otherwise, this method will upload the file to the\nremote server, which will return the file's path on the remote system so\nit may be referenced in subsequent commands.

"},{"title":"GenericLogEntry","link":"GenericLogEntry","description":"

Creates an instance of GenericLogEntry.

"},{"title":"GenericLogEntry#type","link":"type","description":"

Gets the log type.

"},{"title":"GetBrowserForTests~targetBrowser","link":"targetBrowser"},{"title":"Header","link":"Header","description":"

Creates a new Header instance.

"},{"title":"Header#name","link":"name","description":"

Gets the name of the header.

"},{"title":"Header#value","link":"value","description":"

Gets the value of the header.

"},{"title":"HttpClient","link":"HttpClient"},{"title":"HttpClient#client_options","link":"client_options","description":"

client options, header overrides

"},{"title":"HttpClient#keepAlive","link":"keepAlive","description":"

sets keep-alive for the agent\nsee https://stackoverflow.com/a/58332910

"},{"title":"HttpClient#send","link":"send"},{"title":"HttpResponse","link":"HttpResponse","description":"

Creates a HTTP Response that will be used to\nmock out network interceptions.

"},{"title":"HttpResponse#addHeaders","link":"addHeaders","description":"

Add headers that will be returned when we intercept\na HTTP Request

"},{"title":"HttpResponse#body","link":"body","description":"

Sets the value of the body of the HTTP Request that\nwill be returned.

"},{"title":"HttpResponse#method","link":"method","description":"

Sets the method of the HTTP Request

"},{"title":"HttpResponse#method","link":"method","description":"

Returns the Method to be used in the intercept

"},{"title":"HttpResponse#status","link":"status","description":"

Set the STATUS value of the returned HTTP Request

"},{"title":"INTERNAL_COMPUTE_OFFSET_SCRIPT","link":"INTERNAL_COMPUTE_OFFSET_SCRIPT","description":"

Script used to compute the offset from the center of a DOM element's first\nclient rect from the top-left corner of the element's bounding client rect.\nThe element's center point is computed using the algorithm defined here:\nhttps://w3c.github.io/webdriver/webdriver-spec.html#dfn-center-point.

\n

This is only exported for use in internal unit tests. DO NOT USE.

"},{"title":"ISelect","link":"ISelect"},{"title":"ISelect#deselectAll","link":"deselectAll","description":"

Clear all selected entries. This is only valid when the SELECT supports multiple selections.

"},{"title":"ISelect#deselectByIndex","link":"deselectByIndex","description":"

Deselect the option at the given index. This is done by examining the "index" attribute of an\nelement, and not merely by counting.

"},{"title":"ISelect#deselectByValue","link":"deselectByValue","description":"

Deselect all options that have a value matching the argument. That is, when given "foo" this\nwould deselect an option like:

"},{"title":"ISelect#deselectByVisibleText","link":"deselectByVisibleText","description":"

Deselect all options that display text matching the argument. That is, when given "Bar" this\nwould deselect an option like:

\n

<option value="foo">Bar</option>

"},{"title":"ISelect#getAllSelectedOptions","link":"getAllSelectedOptions"},{"title":"ISelect#getFirstSelectedOption","link":"getFirstSelectedOption"},{"title":"ISelect#getOptions","link":"getOptions"},{"title":"ISelect#isMultiple","link":"isMultiple"},{"title":"ISelect#selectByIndex","link":"selectByIndex","description":"

Select the option at the given index. This is done by examining the "index" attribute of an\nelement, and not merely by counting.

"},{"title":"ISelect#selectByValue","link":"selectByValue","description":"

Select all options that have a value matching the argument. That is, when given "foo" this\nwould select an option like:

\n

<option value="foo">Bar</option>

"},{"title":"ISelect#selectByVisibleText","link":"selectByVisibleText","description":"

Select all options that display text matching the argument. That is, when given "Bar" this\nwould select an option like:

\n

<option value="foo">Bar</option>

"},{"title":"IWebDriver","link":"IWebDriver"},{"title":"IWebDriver#actions","link":"actions","description":"

Creates a new action sequence using this driver. The sequence will not be\nsubmitted for execution until\n{@link ./input.Actions#perform Actions.perform()} is called.

"},{"title":"IWebDriver#close","link":"close","description":"

Closes the current window.

"},{"title":"IWebDriver#execute","link":"execute","description":"

Executes the provided {@link command.Command} using this driver's\n{@link command.Executor}.

"},{"title":"IWebDriver#executeAsyncScript","link":"executeAsyncScript","description":"

Executes a snippet of asynchronous JavaScript in the context of the\ncurrently selected frame or window. The script fragment will be executed as\nthe body of an anonymous function. If the script is provided as a function\nobject, that function will be converted to a string for injection into the\ntarget window.

\n

Any arguments provided in addition to the script will be included as script\narguments and may be referenced using the arguments object. Arguments may\nbe a boolean, number, string, or {@linkplain WebElement}. Arrays and\nobjects may also be used as script arguments as long as each item adheres\nto the types previously mentioned.

\n

Unlike executing synchronous JavaScript with {@link #executeScript},\nscripts executed with this function must explicitly signal they are\nfinished by invoking the provided callback. This callback will always be\ninjected into the executed function as the last argument, and thus may be\nreferenced with arguments[arguments.length - 1]. The following steps\nwill be taken for resolving this functions return value against the first\nargument to the script's callback function:

\n
    \n
  • For a HTML element, the value will resolve to a {@link WebElement}
  • \n
  • Null and undefined return values will resolve to null
  • \n
  • Booleans, numbers, and strings will resolve as is
  • \n
  • Functions will resolve to their string representation
  • \n
  • For arrays and objects, each member item will be converted according to\nthe rules above
  • \n
\n

Example #1: Performing a sleep that is synchronized with the currently\nselected window:

\n
var start = new Date().getTime();\ndriver.executeAsyncScript(\n    'window.setTimeout(arguments[arguments.length - 1], 500);').\n    then(function() {\n      console.log(\n          'Elapsed time: ' + (new Date().getTime() - start) + ' ms');\n    });\n
\n

Example #2: Synchronizing a test with an AJAX application:

\n
var button = driver.findElement(By.id('compose-button'));\nbutton.click();\ndriver.executeAsyncScript(\n    'var callback = arguments[arguments.length - 1];' +\n    'mailClient.getComposeWindowWidget().onload(callback);');\ndriver.switchTo().frame('composeWidget');\ndriver.findElement(By.id('to')).sendKeys('dog@example.com');\n
\n

Example #3: Injecting a XMLHttpRequest and waiting for the result. In\nthis example, the inject script is specified with a function literal. When\nusing this format, the function is converted to a string for injection, so\nit should not reference any symbols not defined in the scope of the page\nunder test.

\n
driver.executeAsyncScript(function() {\n  var callback = arguments[arguments.length - 1];\n  var xhr = new XMLHttpRequest();\n  xhr.open("GET", "/resource/data.json", true);\n  xhr.onreadystatechange = function() {\n    if (xhr.readyState == 4) {\n      callback(xhr.responseText);\n    }\n  };\n  xhr.send('');\n}).then(function(str) {\n  console.log(JSON.parse(str)['food']);\n});\n
"},{"title":"IWebDriver#executeScript","link":"executeScript","description":"

Executes a snippet of JavaScript in the context of the currently selected\nframe or window. The script fragment will be executed as the body of an\nanonymous function. If the script is provided as a function object, that\nfunction will be converted to a string for injection into the target\nwindow.

\n

Any arguments provided in addition to the script will be included as script\narguments and may be referenced using the arguments object. Arguments may\nbe a boolean, number, string, or {@linkplain WebElement}. Arrays and\nobjects may also be used as script arguments as long as each item adheres\nto the types previously mentioned.

\n

The script may refer to any variables accessible from the current window.\nFurthermore, the script will execute in the window's context, thus\ndocument may be used to refer to the current document. Any local\nvariables will not be available once the script has finished executing,\nthough global variables will persist.

\n

If the script has a return value (i.e. if the script contains a return\nstatement), then the following steps will be taken for resolving this\nfunctions return value:

\n
    \n
  • For a HTML element, the value will resolve to a {@linkplain WebElement}
  • \n
  • Null and undefined return values will resolve to null
  • \n
  • Booleans, numbers, and strings will resolve as is
  • \n
  • Functions will resolve to their string representation
  • \n
  • For arrays and objects, each member item will be converted according to\nthe rules above
  • \n
"},{"title":"IWebDriver#findElement","link":"findElement","description":"

Locates an element on the page. If the element cannot be found, a\n{@link error.NoSuchElementError} will be returned by the driver.

\n

This function should not be used to test whether an element is present on\nthe page. Rather, you should use {@link #findElements}:

\n
driver.findElements(By.id('foo'))\n    .then(found => console.log('Element found? %s', !!found.length));\n
\n

The search criteria for an element may be defined using one of the\nfactories in the {@link webdriver.By} namespace, or as a short-hand\n{@link webdriver.By.Hash} object. For example, the following two statements\nare equivalent:

\n
var e1 = driver.findElement(By.id('foo'));\nvar e2 = driver.findElement({id:'foo'});\n
\n

You may also provide a custom locator function, which takes as input this\ninstance and returns a {@link WebElement}, or a promise that will resolve\nto a WebElement. If the returned promise resolves to an array of\nWebElements, WebDriver will use the first element. For example, to find the\nfirst visible link on a page, you could write:

\n
var link = driver.findElement(firstVisibleLink);\n\nfunction firstVisibleLink(driver) {\n  var links = driver.findElements(By.tagName('a'));\n  return promise.filter(links, function(link) {\n    return link.isDisplayed();\n  });\n}\n
"},{"title":"IWebDriver#findElements","link":"findElements","description":"

Search for multiple elements on the page. Refer to the documentation on\n{@link #findElement(by)} for information on element locator strategies.

"},{"title":"IWebDriver#get","link":"get","description":"

Navigates to the given URL.

"},{"title":"IWebDriver#getAllWindowHandles","link":"getAllWindowHandles","description":"

Retrieves a list of all available window handles.

"},{"title":"IWebDriver#getCapabilities","link":"getCapabilities"},{"title":"IWebDriver#getCurrentUrl","link":"getCurrentUrl","description":"

Retrieves the URL for the current page.

"},{"title":"IWebDriver#getExecutor","link":"getExecutor"},{"title":"IWebDriver#getPageSource","link":"getPageSource","description":"

Retrieves the current page's source. The returned source is a representation\nof the underlying DOM: do not expect it to be formatted or escaped in the\nsame way as the raw response sent from the web server.

"},{"title":"IWebDriver#getSession","link":"getSession"},{"title":"IWebDriver#getTitle","link":"getTitle","description":"

Retrieves the current page title.

"},{"title":"IWebDriver#getWindowHandle","link":"getWindowHandle","description":"

Retrieves the current window handle.

"},{"title":"IWebDriver#manage","link":"manage"},{"title":"IWebDriver#navigate","link":"navigate"},{"title":"IWebDriver#printPage","link":"printPage","description":"

Takes a PDF of the current page. The driver makes a best effort to\nreturn a PDF based on the provided parameters.

"},{"title":"IWebDriver#quit","link":"quit","description":"

Terminates the browser session. After calling quit, this instance will be\ninvalidated and may no longer be used to issue commands against the\nbrowser.

"},{"title":"IWebDriver#setFileDetector","link":"setFileDetector","description":"

Sets the {@linkplain input.FileDetector file detector} that should be\nused with this instance.

"},{"title":"IWebDriver#sleep","link":"sleep","description":"

Makes the driver sleep for the given amount of time.

"},{"title":"IWebDriver#switchTo","link":"switchTo"},{"title":"IWebDriver#takeScreenshot","link":"takeScreenshot","description":"

Takes a screenshot of the current page. The driver makes the best effort to\nreturn a screenshot of the following, in order of preference:

\n
    \n
  1. Entire page
  2. \n
  3. Current window
  4. \n
  5. Visible portion of the current frame
  6. \n
  7. The entire display containing the browser
  8. \n
"},{"title":"IWebDriver#wait","link":"wait","description":"

Waits for a condition to evaluate to a "truthy" value. The condition may be\nspecified by a {@link Condition}, as a custom function, or as any\npromise-like thenable.

\n

For a {@link Condition} or function, the wait will repeatedly\nevaluate the condition until it returns a truthy value. If any errors occur\nwhile evaluating the condition, they will be allowed to propagate. In the\nevent a condition returns a {@linkplain Promise}, the polling loop will\nwait for it to be resolved and use the resolved value for whether the\ncondition has been satisfied. The resolution time for a promise is always\nfactored into whether a wait has timed out.

\n

If the provided condition is a {@link WebElementCondition}, then\nthe wait will return a {@link WebElementPromise} that will resolve to the\nelement that satisfied the condition.

\n

Example: waiting up to 10 seconds for an element to be present on the\npage.

\n
async function example() {\n  let button =\n      await driver.wait(until.elementLocated(By.id('foo')), 10000);\n  await button.click();\n}\n
"},{"title":"Index","link":"Index","description":"

Create a new websocket connection

"},{"title":"Index#close","link":"close","description":"

Close ws connection.

"},{"title":"Index#isConnected","link":"isConnected"},{"title":"Index#send","link":"send","description":"

Sends a bidi request

"},{"title":"Index#socket","link":"socket"},{"title":"Index#status","link":"status","description":"

Get Bidi Status

"},{"title":"Index#subscribe","link":"subscribe","description":"

Subscribe to events

"},{"title":"Index#unsubscribe","link":"unsubscribe","description":"

Unsubscribe to events

"},{"title":"Index#waitForConnection","link":"waitForConnection","description":"

Resolve connection

"},{"title":"Initiator","link":"Initiator","description":"

Constructs a new Initiator instance.

"},{"title":"Initiator#columnNumber","link":"columnNumber","description":"

Gets the column number.

"},{"title":"Initiator#lineNumber","link":"lineNumber","description":"

Gets the line number.

"},{"title":"Initiator#request","link":"request","description":"

Gets the request ID.

"},{"title":"Initiator#stackTrace","link":"stackTrace","description":"

Gets the stack trace.

"},{"title":"Initiator#type","link":"type","description":"

Gets the type of the initiator.

"},{"title":"Input","link":"Input"},{"title":"Input#perform","link":"perform","description":"

Performs the specified actions on the given browsing context.

"},{"title":"Input#release","link":"release","description":"

Resets the input state in the specified browsing context.

"},{"title":"Input#setFiles","link":"setFiles","description":"

Sets the files property of a given input element.

"},{"title":"InsecureCertificateError","link":"InsecureCertificateError"},{"title":"InterceptPhase","link":"InterceptPhase","description":"

Represents the different phases of intercepting network requests and responses.

"},{"title":"InterceptPhase.AUTH_REQUIRED","link":"AUTH_REQUIRED"},{"title":"InterceptPhase.BEFORE_REQUEST_SENT","link":"BEFORE_REQUEST_SENT"},{"title":"InterceptPhase.RESPONSE_STARTED","link":"RESPONSE_STARTED"},{"title":"InvalidArgumentError","link":"InvalidArgumentError"},{"title":"InvalidCharacterError","link":"InvalidCharacterError"},{"title":"InvalidCookieDomainError","link":"InvalidCookieDomainError"},{"title":"InvalidCoordinatesError","link":"InvalidCoordinatesError"},{"title":"InvalidElementStateError","link":"InvalidElementStateError"},{"title":"InvalidSelectorError","link":"InvalidSelectorError"},{"title":"JavascriptError","link":"JavascriptError"},{"title":"JavascriptLogEntry","link":"JavascriptLogEntry"},{"title":"Key","link":"Key","description":"

Representations of pressable keys that aren't text. These are stored in\nthe Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to\nhttp://www.google.com.au/search?&q=unicode+pua&btnK=Search

"},{"title":"Key.ADD","link":"ADD"},{"title":"Key.ALT","link":"ALT"},{"title":"Key.ARROW_DOWN","link":"ARROW_DOWN"},{"title":"Key.ARROW_LEFT","link":"ARROW_LEFT"},{"title":"Key.ARROW_RIGHT","link":"ARROW_RIGHT"},{"title":"Key.ARROW_UP","link":"ARROW_UP"},{"title":"Key.BACK_SPACE","link":"BACK_SPACE"},{"title":"Key.CANCEL","link":"CANCEL"},{"title":"Key.CLEAR","link":"CLEAR"},{"title":"Key.COMMAND","link":"COMMAND"},{"title":"Key.CONTROL","link":"CONTROL"},{"title":"Key.DECIMAL","link":"DECIMAL"},{"title":"Key.DELETE","link":"DELETE"},{"title":"Key.DIVIDE","link":"DIVIDE"},{"title":"Key.DOWN","link":"DOWN"},{"title":"Key.END","link":"END"},{"title":"Key.ENTER","link":"ENTER"},{"title":"Key.EQUALS","link":"EQUALS"},{"title":"Key.ESCAPE","link":"ESCAPE"},{"title":"Key.F1","link":"F1"},{"title":"Key.F10","link":"F10"},{"title":"Key.F11","link":"F11"},{"title":"Key.F12","link":"F12"},{"title":"Key.F2","link":"F2"},{"title":"Key.F3","link":"F3"},{"title":"Key.F4","link":"F4"},{"title":"Key.F5","link":"F5"},{"title":"Key.F6","link":"F6"},{"title":"Key.F7","link":"F7"},{"title":"Key.F8","link":"F8"},{"title":"Key.F9","link":"F9"},{"title":"Key.HELP","link":"HELP"},{"title":"Key.HOME","link":"HOME"},{"title":"Key.INSERT","link":"INSERT"},{"title":"Key.LEFT","link":"LEFT"},{"title":"Key.META","link":"META"},{"title":"Key.MULTIPLY","link":"MULTIPLY"},{"title":"Key.NULL","link":"NULL"},{"title":"Key.NUMPAD0","link":"NUMPAD0"},{"title":"Key.NUMPAD1","link":"NUMPAD1"},{"title":"Key.NUMPAD2","link":"NUMPAD2"},{"title":"Key.NUMPAD3","link":"NUMPAD3"},{"title":"Key.NUMPAD4","link":"NUMPAD4"},{"title":"Key.NUMPAD5","link":"NUMPAD5"},{"title":"Key.NUMPAD6","link":"NUMPAD6"},{"title":"Key.NUMPAD7","link":"NUMPAD7"},{"title":"Key.NUMPAD8","link":"NUMPAD8"},{"title":"Key.NUMPAD9","link":"NUMPAD9"},{"title":"Key.PAGE_DOWN","link":"PAGE_DOWN"},{"title":"Key.PAGE_UP","link":"PAGE_UP"},{"title":"Key.PAUSE","link":"PAUSE"},{"title":"Key.RETURN","link":"RETURN"},{"title":"Key.RIGHT","link":"RIGHT"},{"title":"Key.SEMICOLON","link":"SEMICOLON"},{"title":"Key.SEPARATOR","link":"SEPARATOR"},{"title":"Key.SHIFT","link":"SHIFT"},{"title":"Key.SPACE","link":"SPACE"},{"title":"Key.SUBTRACT","link":"SUBTRACT"},{"title":"Key.TAB","link":"TAB"},{"title":"Key.UP","link":"UP"},{"title":"Key.ZENKAKU_HANKAKU","link":"ZENKAKU_HANKAKU","description":"

Japanese modifier key for switching between full- and half-width\ncharacters.

"},{"title":"Key.chord","link":"chord","description":"

Simulate pressing many keys at once in a "chord". Takes a sequence of\n{@linkplain Key keys} or strings, appends each of the values to a string,\nadds the chord termination key ({@link Key.NULL}) and returns the resulting\nstring.

\n

Note: when the low-level webdriver key handlers see Keys.NULL, active\nmodifier keys (CTRL/ALT/SHIFT/etc) release via a keyup event.

"},{"title":"Keyboard","link":"Keyboard"},{"title":"Keyboard#keyDown","link":"keyDown","description":"

Generates a key down action.

"},{"title":"Keyboard#keyUp","link":"keyUp","description":"

Generates a key up action.

"},{"title":"Level","link":"Level"},{"title":"Level#name","link":"name","description":"

This logger's name.

"},{"title":"Level#toString","link":"toString"},{"title":"Level#value","link":"value","description":"

The numeric log level.

"},{"title":"Level.ALL","link":"ALL","description":"

Indicates all log messages should be recorded.

"},{"title":"Level.DEBUG","link":"DEBUG","description":"

Log messages with a level of 700 or higher.

"},{"title":"Level.FINE","link":"FINE","description":"

Log messages with a level of 500 or higher.

"},{"title":"Level.FINER","link":"FINER","description":"

Log messages with a level of 400 or higher.

"},{"title":"Level.FINEST","link":"FINEST","description":"

Log messages with a level of 300 or higher.

"},{"title":"Level.INFO","link":"INFO","description":"

Log messages with a level of 800 or higher.

"},{"title":"Level.OFF","link":"OFF","description":"

Indicates no log messages should be recorded.

"},{"title":"Level.SEVERE","link":"SEVERE","description":"

Log messages with a level of 1000 or higher.

"},{"title":"Level.WARNING","link":"WARNING","description":"

Log messages with a level of 900 or higher.

"},{"title":"LocalValue","link":"LocalValue"},{"title":"LocalValue.createArrayValue","link":"createArrayValue","description":"

Creates a new LocalValue object with an array.

"},{"title":"LocalValue.createBigIntValue","link":"createBigIntValue","description":"

Creates a new LocalValue object with a BigInt value.

"},{"title":"LocalValue.createBooleanValue","link":"createBooleanValue","description":"

Creates a new LocalValue object with a boolean value.

"},{"title":"LocalValue.createChannelValue","link":"createChannelValue","description":"

Creates a new LocalValue object with the given channel value

"},{"title":"LocalValue.createDateValue","link":"createDateValue","description":"

Creates a new LocalValue object with date value.

"},{"title":"LocalValue.createMapValue","link":"createMapValue","description":"

Creates a new LocalValue object of map value.

"},{"title":"LocalValue.createNullValue","link":"createNullValue","description":"

Creates a new LocalValue object with a null value.

"},{"title":"LocalValue.createNumberValue","link":"createNumberValue","description":"

Creates a new LocalValue object with a number value.

"},{"title":"LocalValue.createObjectValue","link":"createObjectValue","description":"

Creates a new LocalValue object from the passed object.

"},{"title":"LocalValue.createRegularExpressionValue","link":"createRegularExpressionValue","description":"

Creates a new LocalValue object of regular expression value.

"},{"title":"LocalValue.createSetValue","link":"createSetValue","description":"

Creates a new LocalValue object with the specified value.

"},{"title":"LocalValue.createSpecialNumberValue","link":"createSpecialNumberValue","description":"

Creates a new LocalValue object with a special number value.

"},{"title":"LocalValue.createStringValue","link":"createStringValue","description":"

Creates a new LocalValue object with a string value.

"},{"title":"LocalValue.createUndefinedValue","link":"createUndefinedValue","description":"

Creates a new LocalValue object with an undefined value.

"},{"title":"Locator","link":"Locator"},{"title":"Locator.css","link":"css","description":"

Creates a new Locator object with CSS selector type.

"},{"title":"Locator.innerText","link":"innerText","description":"

Creates a new Locator object with the specified inner text value.

"},{"title":"Locator.xpath","link":"xpath","description":"

Creates a new Locator object with the given XPath value.

"},{"title":"LogInspector#close","link":"close","description":"

Unsubscribe to log event

"},{"title":"LogInspector#init","link":"init","description":"

Subscribe to log event

"},{"title":"LogInspector#onConsoleEntry","link":"onConsoleEntry","description":"

Listen to Console logs

"},{"title":"LogInspector#onJavascriptException","link":"onJavascriptException","description":"

Listen to JS Exceptions

"},{"title":"LogInspector#onJavascriptLog","link":"onJavascriptLog","description":"

Listen to JS logs

"},{"title":"LogInspector#onLog","link":"onLog","description":"

Listen to any logs

"},{"title":"LogManager","link":"LogManager"},{"title":"LogManager#getLogger","link":"getLogger","description":"

Retrieves a named logger, creating it in the process. This function will\nimplicitly create the requested logger, and any of its parents, if they\ndo not yet exist.

"},{"title":"Logger","link":"Logger"},{"title":"Logger#addHandler","link":"addHandler","description":"

Adds a handler to this logger. The handler will be invoked for each message\nlogged with this instance, or any of its descendants.

"},{"title":"Logger#debug","link":"debug","description":"

Logs a message at the {@link Level.DEBUG} log level.

"},{"title":"Logger#fine","link":"fine","description":"

Logs a message at the {@link Level.FINE} log level.

"},{"title":"Logger#finer","link":"finer","description":"

Logs a message at the {@link Level.FINER} log level.

"},{"title":"Logger#finest","link":"finest","description":"

Logs a message at the {@link Level.FINEST} log level.

"},{"title":"Logger#getEffectiveLevel","link":"getEffectiveLevel"},{"title":"Logger#getLevel","link":"getLevel"},{"title":"Logger#getName","link":"getName"},{"title":"Logger#info","link":"info","description":"

Logs a message at the {@link Level.INFO} log level.

"},{"title":"Logger#isLoggable","link":"isLoggable"},{"title":"Logger#log","link":"log","description":"

Logs a message at the given level. The message may be defined as a string\nor as a function that will return the message. If a function is provided,\nit will only be invoked if this logger's\n{@linkplain #getEffectiveLevel() effective log level} includes the given\nlevel.

"},{"title":"Logger#removeHandler","link":"removeHandler","description":"

Removes a handler from this logger.

"},{"title":"Logger#setLevel","link":"setLevel"},{"title":"Logger#severe","link":"severe","description":"

Logs a message at the {@link Level.SEVERE} log level.

"},{"title":"Logger#warning","link":"warning","description":"

Logs a message at the {@link Level.WARNING} log level.

"},{"title":"Logs#get","link":"get","description":"

Fetches available log entries for the given type.

\n

Note that log buffers are reset after each call, meaning that available\nlog entries correspond to those entries not yet returned for a given log\ntype. In practice, this means that this call will return the available log\nentries since the last call, or from the start of the session.

"},{"title":"Logs#getAvailableLogTypes","link":"getAvailableLogTypes","description":"

Retrieves the log types available to this driver.

"},{"title":"ManualConfig","link":"ManualConfig","description":"

Record object that defines a manual proxy configuration. Manual\nconfigurations can be easily created using either the\n{@link ./proxy.manual proxy.manual()} or {@link ./proxy.socks proxy.socks()}\nfactory method.

"},{"title":"ManualConfig","link":"ManualConfig"},{"title":"ManualConfig#ftpProxy","link":"ftpProxy","description":"

The proxy host for FTP requests.

"},{"title":"ManualConfig#httpProxy","link":"httpProxy","description":"

The proxy host for HTTP requests.

"},{"title":"ManualConfig#noProxy","link":"noProxy","description":"

An array of hosts which should bypass all proxies.

"},{"title":"ManualConfig#socksProxy","link":"socksProxy","description":"

Defines the host and port for the SOCKS proxy to use.

"},{"title":"ManualConfig#socksVersion","link":"socksVersion","description":"

Defines the SOCKS proxy version. Must be a number in the range [0, 255].

"},{"title":"ManualConfig#sslProxy","link":"sslProxy","description":"

The proxy host for HTTPS requests.

"},{"title":"Message","link":"Message","description":"

Creates a new Message instance.

"},{"title":"Message#channel","link":"channel","description":"

Gets the channel through which the message is received.

"},{"title":"Message#data","link":"data","description":"

Gets the data contained in the message.

"},{"title":"Message#source","link":"source","description":"

Gets the source of the message.

"},{"title":"MoveTargetOutOfBoundsError","link":"MoveTargetOutOfBoundsError"},{"title":"Name","link":"Name","description":"

Enumeration of predefined names command names that all command processors\nwill support.

"},{"title":"Name.ACCEPT_ALERT","link":"ACCEPT_ALERT"},{"title":"Name.ACTIONS","link":"ACTIONS"},{"title":"Name.ADD_COOKIE","link":"ADD_COOKIE"},{"title":"Name.ADD_CREDENTIAL","link":"ADD_CREDENTIAL"},{"title":"Name.ADD_VIRTUAL_AUTHENTICATOR","link":"ADD_VIRTUAL_AUTHENTICATOR"},{"title":"Name.CANCEL_DIALOG","link":"CANCEL_DIALOG"},{"title":"Name.CLEAR_ACTIONS","link":"CLEAR_ACTIONS"},{"title":"Name.CLEAR_ELEMENT","link":"CLEAR_ELEMENT"},{"title":"Name.CLICK_DIALOG_BUTTON","link":"CLICK_DIALOG_BUTTON"},{"title":"Name.CLICK_ELEMENT","link":"CLICK_ELEMENT"},{"title":"Name.CLOSE","link":"CLOSE"},{"title":"Name.DELETE_ALL_COOKIES","link":"DELETE_ALL_COOKIES"},{"title":"Name.DELETE_COOKIE","link":"DELETE_COOKIE"},{"title":"Name.DELETE_DOWNLOADABLE_FILES","link":"DELETE_DOWNLOADABLE_FILES"},{"title":"Name.DISMISS_ALERT","link":"DISMISS_ALERT"},{"title":"Name.DOWNLOAD_FILE","link":"DOWNLOAD_FILE"},{"title":"Name.EXECUTE_ASYNC_SCRIPT","link":"EXECUTE_ASYNC_SCRIPT"},{"title":"Name.EXECUTE_SCRIPT","link":"EXECUTE_SCRIPT"},{"title":"Name.FIND_CHILD_ELEMENT","link":"FIND_CHILD_ELEMENT"},{"title":"Name.FIND_CHILD_ELEMENTS","link":"FIND_CHILD_ELEMENTS"},{"title":"Name.FIND_ELEMENT","link":"FIND_ELEMENT"},{"title":"Name.FIND_ELEMENTS","link":"FIND_ELEMENTS"},{"title":"Name.FIND_ELEMENTS_FROM_SHADOWROOT","link":"FIND_ELEMENTS_FROM_SHADOWROOT"},{"title":"Name.FIND_ELEMENTS_RELATIVE","link":"FIND_ELEMENTS_RELATIVE"},{"title":"Name.FIND_ELEMENT_FROM_SHADOWROOT","link":"FIND_ELEMENT_FROM_SHADOWROOT"},{"title":"Name.FULLSCREEN_WINDOW","link":"FULLSCREEN_WINDOW"},{"title":"Name.GET","link":"GET"},{"title":"Name.GET_ACCOUNTS","link":"GET_ACCOUNTS"},{"title":"Name.GET_ACTIVE_ELEMENT","link":"GET_ACTIVE_ELEMENT"},{"title":"Name.GET_ALERT_TEXT","link":"GET_ALERT_TEXT"},{"title":"Name.GET_ALL_COOKIES","link":"GET_ALL_COOKIES"},{"title":"Name.GET_AVAILABLE_LOG_TYPES","link":"GET_AVAILABLE_LOG_TYPES"},{"title":"Name.GET_COMPUTED_LABEL","link":"GET_COMPUTED_LABEL"},{"title":"Name.GET_COMPUTED_ROLE","link":"GET_COMPUTED_ROLE"},{"title":"Name.GET_COOKIE","link":"GET_COOKIE"},{"title":"Name.GET_CREDENTIALS","link":"GET_CREDENTIALS"},{"title":"Name.GET_CURRENT_URL","link":"GET_CURRENT_URL"},{"title":"Name.GET_CURRENT_WINDOW_HANDLE","link":"GET_CURRENT_WINDOW_HANDLE"},{"title":"Name.GET_DOM_ATTRIBUTE","link":"GET_DOM_ATTRIBUTE"},{"title":"Name.GET_DOWNLOADABLE_FILES","link":"GET_DOWNLOADABLE_FILES"},{"title":"Name.GET_ELEMENT_ATTRIBUTE","link":"GET_ELEMENT_ATTRIBUTE"},{"title":"Name.GET_ELEMENT_PROPERTY","link":"GET_ELEMENT_PROPERTY"},{"title":"Name.GET_ELEMENT_RECT","link":"GET_ELEMENT_RECT"},{"title":"Name.GET_ELEMENT_TAG_NAME","link":"GET_ELEMENT_TAG_NAME"},{"title":"Name.GET_ELEMENT_TEXT","link":"GET_ELEMENT_TEXT"},{"title":"Name.GET_ELEMENT_VALUE_OF_CSS_PROPERTY","link":"GET_ELEMENT_VALUE_OF_CSS_PROPERTY"},{"title":"Name.GET_FEDCM_DIALOG_TYPE","link":"GET_FEDCM_DIALOG_TYPE"},{"title":"Name.GET_FEDCM_TITLE","link":"GET_FEDCM_TITLE"},{"title":"Name.GET_LOG","link":"GET_LOG"},{"title":"Name.GET_PAGE_SOURCE","link":"GET_PAGE_SOURCE"},{"title":"Name.GET_SERVER_STATUS","link":"GET_SERVER_STATUS"},{"title":"Name.GET_SESSIONS","link":"GET_SESSIONS"},{"title":"Name.GET_SHADOW_ROOT","link":"GET_SHADOW_ROOT"},{"title":"Name.GET_TIMEOUT","link":"GET_TIMEOUT"},{"title":"Name.GET_TITLE","link":"GET_TITLE"},{"title":"Name.GET_WINDOW_HANDLES","link":"GET_WINDOW_HANDLES"},{"title":"Name.GET_WINDOW_RECT","link":"GET_WINDOW_RECT"},{"title":"Name.GO_BACK","link":"GO_BACK"},{"title":"Name.GO_FORWARD","link":"GO_FORWARD"},{"title":"Name.IS_ELEMENT_DISPLAYED","link":"IS_ELEMENT_DISPLAYED"},{"title":"Name.IS_ELEMENT_ENABLED","link":"IS_ELEMENT_ENABLED"},{"title":"Name.IS_ELEMENT_SELECTED","link":"IS_ELEMENT_SELECTED"},{"title":"Name.MAXIMIZE_WINDOW","link":"MAXIMIZE_WINDOW"},{"title":"Name.MINIMIZE_WINDOW","link":"MINIMIZE_WINDOW"},{"title":"Name.NEW_SESSION","link":"NEW_SESSION"},{"title":"Name.PRINT_PAGE","link":"PRINT_PAGE"},{"title":"Name.QUIT","link":"QUIT"},{"title":"Name.REFRESH","link":"REFRESH"},{"title":"Name.REMOVE_ALL_CREDENTIALS","link":"REMOVE_ALL_CREDENTIALS"},{"title":"Name.REMOVE_CREDENTIAL","link":"REMOVE_CREDENTIAL"},{"title":"Name.REMOVE_VIRTUAL_AUTHENTICATOR","link":"REMOVE_VIRTUAL_AUTHENTICATOR"},{"title":"Name.RESET_COOLDOWN","link":"RESET_COOLDOWN"},{"title":"Name.SCREENSHOT","link":"SCREENSHOT"},{"title":"Name.SELECT_ACCOUNT","link":"SELECT_ACCOUNT"},{"title":"Name.SEND_KEYS_TO_ELEMENT","link":"SEND_KEYS_TO_ELEMENT"},{"title":"Name.SET_ALERT_TEXT","link":"SET_ALERT_TEXT"},{"title":"Name.SET_DELAY_ENABLED","link":"SET_DELAY_ENABLED"},{"title":"Name.SET_TIMEOUT","link":"SET_TIMEOUT"},{"title":"Name.SET_USER_VERIFIED","link":"SET_USER_VERIFIED"},{"title":"Name.SET_WINDOW_RECT","link":"SET_WINDOW_RECT"},{"title":"Name.SWITCH_TO_FRAME","link":"SWITCH_TO_FRAME"},{"title":"Name.SWITCH_TO_FRAME_PARENT","link":"SWITCH_TO_FRAME_PARENT"},{"title":"Name.SWITCH_TO_NEW_WINDOW","link":"SWITCH_TO_NEW_WINDOW"},{"title":"Name.SWITCH_TO_WINDOW","link":"SWITCH_TO_WINDOW"},{"title":"Name.TAKE_ELEMENT_SCREENSHOT","link":"TAKE_ELEMENT_SCREENSHOT"},{"title":"Name.UPLOAD_FILE","link":"UPLOAD_FILE"},{"title":"NavigateResult","link":"NavigateResult"},{"title":"NavigateResult#navigationId","link":"navigationId","description":"

Gets the ID of the navigation operation.

"},{"title":"NavigateResult#url","link":"url","description":"

Gets the URL of the navigated page.

"},{"title":"Navigation#back","link":"back","description":"

Moves backwards in the browser history.

"},{"title":"Navigation#forward","link":"forward","description":"

Moves forwards in the browser history.

"},{"title":"Navigation#refresh","link":"refresh","description":"

Refreshes the current page.

"},{"title":"Navigation#to","link":"to","description":"

Navigates to a new URL.

"},{"title":"NavigationInfo","link":"NavigationInfo","description":"

Constructs a new NavigationInfo object.

"},{"title":"Network","link":"Network","description":"

Represents a Network object.

"},{"title":"Network#addIntercept","link":"addIntercept","description":"

Adds a network intercept.

"},{"title":"Network#authRequired","link":"authRequired","description":"

Subscribes to the 'network.authRequired' event and handles it with the provided callback.

"},{"title":"Network#beforeRequestSent","link":"beforeRequestSent","description":"

Subscribes to the 'network.beforeRequestSent' event and handles it with the provided callback.

"},{"title":"Network#cancelAuth","link":"cancelAuth","description":"

Cancels the authentication for a specific request.

"},{"title":"Network#close","link":"close","description":"

Unsubscribes from network events for all browsing contexts.

"},{"title":"Network#continueRequest","link":"continueRequest","description":"

Continues the network request with the provided parameters.

"},{"title":"Network#continueResponse","link":"continueResponse","description":"

Continues the network response with the given parameters.

"},{"title":"Network#continueWithAuth","link":"continueWithAuth","description":"

Continues the network request with authentication credentials.

"},{"title":"Network#continueWithAuthNoCredentials","link":"continueWithAuthNoCredentials","description":"

Continues the network request with authentication but without providing credentials.

"},{"title":"Network#failRequest","link":"failRequest","description":"

Fails a network request.

"},{"title":"Network#fetchError","link":"fetchError","description":"

Subscribes to the 'network.fetchError' event and handles it with the provided callback.

"},{"title":"Network#provideResponse","link":"provideResponse","description":"

Provides a response for the network.

"},{"title":"Network#removeIntercept","link":"removeIntercept","description":"

Removes an intercept.

"},{"title":"Network#responseCompleted","link":"responseCompleted","description":"

Subscribes to the 'network.responseCompleted' event and handles it with the provided callback.

"},{"title":"Network#responseStarted","link":"responseStarted","description":"

Subscribes to the 'network.responseStarted' event and handles it with the provided callback.

"},{"title":"NetworkInspector","link":"NetworkInspector"},{"title":"NoSuchAlertError","link":"NoSuchAlertError"},{"title":"NoSuchCookieError","link":"NoSuchCookieError"},{"title":"NoSuchElementError","link":"NoSuchElementError"},{"title":"NoSuchFrameError","link":"NoSuchFrameError"},{"title":"NoSuchSessionError","link":"NoSuchSessionError"},{"title":"NoSuchShadowRootError","link":"NoSuchShadowRootError"},{"title":"NoSuchWindowError","link":"NoSuchWindowError"},{"title":"NonPrimitiveType","link":"NonPrimitiveType","description":"

Represents a non-primitive type.

"},{"title":"NonPrimitiveType.ARRAY","link":"ARRAY"},{"title":"NonPrimitiveType.CHANNEL","link":"CHANNEL"},{"title":"NonPrimitiveType.DATE","link":"DATE"},{"title":"NonPrimitiveType.MAP","link":"MAP"},{"title":"NonPrimitiveType.OBJECT","link":"OBJECT"},{"title":"NonPrimitiveType.REGULAR_EXPRESSION","link":"REGULAR_EXPRESSION"},{"title":"NonPrimitiveType.SET","link":"SET"},{"title":"NonPrimitiveType.findByName","link":"findByName"},{"title":"Options","link":"Options"},{"title":"Options#addCookie","link":"addCookie","description":"

Adds a cookie.

\n

Sample Usage:

\n
// Set a basic cookie.\ndriver.manage().addCookie({name: 'foo', value: 'bar'});\n\n// Set a cookie that expires in 10 minutes.\nlet expiry = new Date(Date.now() + (10 * 60 * 1000));\ndriver.manage().addCookie({name: 'foo', value: 'bar', expiry});\n\n// The cookie expiration may also be specified in seconds since epoch.\ndriver.manage().addCookie({\n  name: 'foo',\n  value: 'bar',\n  expiry: Math.floor(Date.now() / 1000)\n});\n
"},{"title":"Options#args","link":"args","description":"

Command line arguments for the child process, if any.

"},{"title":"Options#deleteAllCookies","link":"deleteAllCookies","description":"

Deletes all cookies visible to the current page.

"},{"title":"Options#deleteCookie","link":"deleteCookie","description":"

Deletes the cookie with the given name. This command is a no-op if there is\nno cookie with the given name visible to the current page.

"},{"title":"Options#env","link":"env","description":"

Environment variables for the spawned process. If unspecified, the\nchild will inherit this process' environment.

"},{"title":"Options#getCookie","link":"getCookie","description":"

Retrieves the cookie with the given name. Returns null if there is no such\ncookie. The cookie will be returned as a JSON object as described by the\nWebDriver wire protocol.

"},{"title":"Options#getCookies","link":"getCookies","description":"

Retrieves all cookies visible to the current page. Each cookie will be\nreturned as a JSON object as described by the WebDriver wire protocol.

"},{"title":"Options#getTimeouts","link":"getTimeouts","description":"

Fetches the timeouts currently configured for the current session.

"},{"title":"Options#logs","link":"logs"},{"title":"Options#setTimeouts","link":"setTimeouts","description":"

Sets the timeout durations associated with the current session.

\n

The following timeouts are supported (all timeouts are specified in\nmilliseconds):

\n
    \n
  • \n

    implicit specifies the maximum amount of time to wait for an element\nlocator to succeed when {@linkplain WebDriver#findElement locating}\n{@linkplain WebDriver#findElements elements} on the page.\nDefaults to 0 milliseconds.

    \n
  • \n
  • \n

    pageLoad specifies the maximum amount of time to wait for a page to\nfinishing loading. Defaults to 300000 milliseconds.

    \n
  • \n
  • \n

    script specifies the maximum amount of time to wait for an\n{@linkplain WebDriver#executeScript evaluated script} to run. If set to\nnull, the script timeout will be indefinite.\nDefaults to 30000 milliseconds.

    \n
  • \n
"},{"title":"Options#stdio","link":"stdio","description":"

IO conifguration for the spawned server child process. If unspecified,\nthe child process' IO output will be ignored.

"},{"title":"Options#window","link":"window"},{"title":"Options.Cookie","link":"Cookie","description":"

A record object describing a browser cookie.

"},{"title":"Options.Cookie#domain","link":"domain","description":"

The domain the cookie is visible to. Defaults to the current browsing\ncontext's document's URL when adding a cookie.

"},{"title":"Options.Cookie#expiry","link":"expiry","description":"

When the cookie expires.

\n

When {@linkplain Options#addCookie() adding a cookie}, this may be specified\nas a {@link Date} object, or in seconds since Unix epoch (January 1, 1970).

\n

The expiry is always returned in seconds since epoch when\n{@linkplain Options#getCookies() retrieving cookies} from the browser.

"},{"title":"Options.Cookie#httpOnly","link":"httpOnly","description":"

Whether the cookie is an HTTP only cookie. Defaults to false when adding a\nnew cookie.

"},{"title":"Options.Cookie#name","link":"name","description":"

The name of the cookie.

"},{"title":"Options.Cookie#path","link":"path","description":"

The cookie path. Defaults to "/" when adding a cookie.

"},{"title":"Options.Cookie#sameSite","link":"sameSite","description":"

When the cookie applies to a SameSite policy.

\n

When {@linkplain Options#addCookie() adding a cookie}, this may be specified\nas a {@link string} object which is one of 'Lax', 'Strict' or 'None'.

"},{"title":"Options.Cookie#secure","link":"secure","description":"

Whether the cookie is a secure cookie. Defaults to false when adding a new\ncookie.

"},{"title":"Options.Cookie#value","link":"value","description":"

The cookie value.

"},{"title":"Origin","link":"Origin","description":"

Defines the reference point from which to compute offsets for capturing screenshot.

"},{"title":"Origin","link":"Origin","description":"

Defines the reference point from which to compute offsets for\n{@linkplain ./input.Pointer#move pointer move} actions.

"},{"title":"Origin.DOCUMENT","link":"DOCUMENT"},{"title":"Origin.POINTER","link":"POINTER","description":"

Compute offsets relative to the pointer's current position.

"},{"title":"Origin.VIEWPORT","link":"VIEWPORT"},{"title":"Origin.VIEWPORT","link":"VIEWPORT","description":"

Compute offsets relative to the viewport.

"},{"title":"PacConfig","link":"PacConfig","description":"

Describes how to configure a PAC proxy.

"},{"title":"PacConfig","link":"PacConfig"},{"title":"PacConfig#proxyAutoconfigUrl","link":"proxyAutoconfigUrl","description":"

URL for the PAC file to use.

"},{"title":"PageLoadStrategy","link":"PageLoadStrategy","description":"

Strategies for waiting for document readiness after a navigation\nevent.

"},{"title":"PageLoadStrategy.EAGER","link":"EAGER","description":"

Indicates WebDriver should wait for the document readiness state to\nbecome "interactive" after navigation.

"},{"title":"PageLoadStrategy.NONE","link":"NONE","description":"

Indicates WebDriver should not wait on the document readiness state after a\nnavigation event.

"},{"title":"PageLoadStrategy.NORMAL","link":"NORMAL","description":"

Indicates WebDriver should wait for the document readiness state to\nbe "complete" after navigation. This is the default page loading strategy.

"},{"title":"PartialCookie","link":"PartialCookie","description":"

Represents a partial cookie.

"},{"title":"PartialCookie#expiry","link":"expiry","description":"

Sets the expiry for the cookie.

"},{"title":"PartialCookie#httpOnly","link":"httpOnly","description":"

Sets the httpOnly flag for the cookie.

"},{"title":"PartialCookie#path","link":"path","description":"

Sets the path for the cookie.

"},{"title":"PartialCookie#sameSite","link":"sameSite","description":"

Sets the SameSite attribute for the cookie.

"},{"title":"PartialCookie#secure","link":"secure","description":"

Sets the secure flag for the cookie.

"},{"title":"PartialCookie#size","link":"size","description":"

Sets the size of the cookie.

"},{"title":"PartitionDescriptor","link":"PartitionDescriptor","description":"

Constructs a new PartitionDescriptor instance.

"},{"title":"PartitionKey","link":"PartitionKey","description":"

Constructs a new PartitionKey object.

"},{"title":"PartitionKey#sourceOrigin","link":"sourceOrigin","description":"

Gets the source origin.

"},{"title":"PartitionKey#userContext","link":"userContext","description":"

Gets the user context.

"},{"title":"Platform","link":"Platform","description":"

Common platform names. These platforms are not explicitly defined by the\nWebDriver spec, however, their use is encouraged for interoperability.

"},{"title":"Platform.LINUX","link":"LINUX"},{"title":"Platform.MAC","link":"MAC"},{"title":"Platform.WINDOWS","link":"WINDOWS"},{"title":"Pointer","link":"Pointer"},{"title":"Pointer#cancel","link":"cancel"},{"title":"Pointer#move","link":"move","description":"

Creates an action for moving the pointer x and y pixels from the\nspecified origin. The origin may be defined as the pointer's\n{@linkplain Origin.POINTER current position}, the\n{@linkplain Origin.VIEWPORT viewport}, or the center of a specific\n{@linkplain ./webdriver.WebElement WebElement}.

"},{"title":"Pointer#press","link":"press"},{"title":"Pointer#release","link":"release"},{"title":"Pointer#toJSON","link":"toJSON"},{"title":"Pointer.Type","link":"Type","description":"

The supported types of pointers.

"},{"title":"Pointer.Type.MOUSE","link":"MOUSE"},{"title":"Pointer.Type.PEN","link":"PEN"},{"title":"Pointer.Type.TOUCH","link":"TOUCH"},{"title":"Preferences","link":"Preferences"},{"title":"Preferences#setLevel","link":"setLevel","description":"

Sets the desired logging level for a particular log type.

"},{"title":"Preferences#toJSON","link":"toJSON","description":"

Converts this instance to its JSON representation.

"},{"title":"PrimitiveType","link":"PrimitiveType","description":"

Represents a primitive type.

"},{"title":"PrimitiveType.BIGINT","link":"BIGINT"},{"title":"PrimitiveType.BOOLEAN","link":"BOOLEAN"},{"title":"PrimitiveType.NULL","link":"NULL"},{"title":"PrimitiveType.NUMBER","link":"NUMBER"},{"title":"PrimitiveType.SPECIAL_NUMBER","link":"SPECIAL_NUMBER"},{"title":"PrimitiveType.STRING","link":"STRING"},{"title":"PrimitiveType.UNDEFINED","link":"UNDEFINED"},{"title":"PrimitiveType.findByName","link":"findByName"},{"title":"PrintResult","link":"PrintResult"},{"title":"PrintResult#data","link":"data","description":"

Gets the data associated with the print result.

"},{"title":"Protocol","link":"Protocol","description":"

Protocol for virtual authenticators

"},{"title":"Protocol.CTAP2","link":"CTAP2"},{"title":"Protocol.U2F","link":"U2F"},{"title":"ProvideResponseParameters","link":"ProvideResponseParameters"},{"title":"ProvideResponseParameters#body","link":"body","description":"

Sets the body value for the response parameters.

"},{"title":"ProvideResponseParameters#cookies","link":"cookies","description":"

Sets the cookie headers for the response.

"},{"title":"ProvideResponseParameters#headers","link":"headers","description":"

Sets the headers for the response.

"},{"title":"ProvideResponseParameters#reasonPhrase","link":"reasonPhrase","description":"

Sets the reason phrase for the response.

"},{"title":"ProvideResponseParameters#statusCode","link":"statusCode","description":"

Sets the status code for the response.

"},{"title":"RealmInfo","link":"RealmInfo","description":"

Constructs a new RealmInfo object.

"},{"title":"RealmType","link":"RealmType","description":"

Represents the types of realms.\nDescribed in https://w3c.github.io/webdriver-bidi/#type-script-RealmType.

"},{"title":"RealmType.AUDIO_WORKLET","link":"AUDIO_WORKLET"},{"title":"RealmType.DEDICATED_WORKER","link":"DEDICATED_WORKER"},{"title":"RealmType.PAINT_WORKLET","link":"PAINT_WORKLET"},{"title":"RealmType.SERVICE_WORKED","link":"SERVICE_WORKED"},{"title":"RealmType.SHARED_WORKED","link":"SHARED_WORKED"},{"title":"RealmType.WINDOW","link":"WINDOW"},{"title":"RealmType.WORKER","link":"WORKER"},{"title":"RealmType.WORKLET","link":"WORKLET"},{"title":"RealmType.findByName","link":"findByName"},{"title":"ReferenceValue","link":"ReferenceValue","description":"

Constructs a new ReferenceValue object.

"},{"title":"RegExpValue","link":"RegExpValue","description":"

Constructs a new RegExpValue object.

"},{"title":"RelativeBy","link":"RelativeBy"},{"title":"RelativeBy#above","link":"above","description":"

Look for elements above the root element passed in

"},{"title":"RelativeBy#below","link":"below","description":"

Look for elements below the root element passed in

"},{"title":"RelativeBy#marshall","link":"marshall","description":"

Returns a marshalled version of the {@link RelativeBy}

"},{"title":"RelativeBy#near","link":"near","description":"

Look for elements near the root element passed in

"},{"title":"RelativeBy#straightAbove","link":"straightAbove","description":"

Look for elements above the root element passed in

"},{"title":"RelativeBy#straightBelow","link":"straightBelow","description":"

Look for elements below the root element passed in

"},{"title":"RelativeBy#straightToLeftOf","link":"straightToLeftOf","description":"

Look for elements left the root element passed in

"},{"title":"RelativeBy#straightToRightOf","link":"straightToRightOf","description":"

Look for elements right the root element passed in

"},{"title":"RelativeBy#toLeftOf","link":"toLeftOf","description":"

Look for elements left the root element passed in

"},{"title":"RelativeBy#toRightOf","link":"toRightOf","description":"

Look for elements right the root element passed in

"},{"title":"RelativeBy#toString","link":"toString"},{"title":"RemoteReferenceType","link":"RemoteReferenceType","description":"

Represents the types of remote reference.

"},{"title":"RemoteReferenceType.HANDLE","link":"HANDLE"},{"title":"RemoteReferenceType.SHARED_ID","link":"SHARED_ID"},{"title":"RemoteType","link":"RemoteType","description":"

Represents a remote value type.

"},{"title":"RemoteType.ARRAY_BUFFER","link":"ARRAY_BUFFER"},{"title":"RemoteType.ERROR","link":"ERROR"},{"title":"RemoteType.FUNCTION","link":"FUNCTION"},{"title":"RemoteType.GENERATOR","link":"GENERATOR"},{"title":"RemoteType.HTML_COLLECTION","link":"HTML_COLLECTION"},{"title":"RemoteType.ITERATOR","link":"ITERATOR"},{"title":"RemoteType.NODE","link":"NODE"},{"title":"RemoteType.NODE_LIST","link":"NODE_LIST"},{"title":"RemoteType.PROMISE","link":"PROMISE"},{"title":"RemoteType.PROXY","link":"PROXY"},{"title":"RemoteType.SYMBOL","link":"SYMBOL"},{"title":"RemoteType.TYPED_ARRAY","link":"TYPED_ARRAY"},{"title":"RemoteType.WEAK_MAP","link":"WEAK_MAP"},{"title":"RemoteType.WEAK_SET","link":"WEAK_SET"},{"title":"RemoteType.WINDOW","link":"WINDOW"},{"title":"RemoteType.findByName","link":"findByName"},{"title":"RemoteValue","link":"RemoteValue"},{"title":"Request","link":"Request"},{"title":"Request#toString","link":"toString"},{"title":"RequestData","link":"RequestData"},{"title":"RequestData#bodySize","link":"bodySize","description":"

Get the size of the request body in bytes.

"},{"title":"RequestData#cookies","link":"cookies","description":"

Get the cookies of the request.

"},{"title":"RequestData#headers","link":"headers","description":"

Get the headers of the request.

"},{"title":"RequestData#headersSize","link":"headersSize","description":"

Get the size of the headers in bytes.

"},{"title":"RequestData#method","link":"method","description":"

Get the HTTP method of the request.

"},{"title":"RequestData#request","link":"request","description":"

Get the request id.

"},{"title":"RequestData#timings","link":"timings","description":"

Get the timing information of the request.

"},{"title":"RequestData#url","link":"url","description":"

Get the URL of the request.

"},{"title":"RequestOptions","link":"RequestOptions"},{"title":"Response","link":"Response"},{"title":"Response#toString","link":"toString"},{"title":"ResponseData","link":"ResponseData"},{"title":"ResponseData#bodySize","link":"bodySize","description":"

Get the size of the body.

"},{"title":"ResponseData#bytesReceived","link":"bytesReceived","description":"

Gets the number of bytes received.

"},{"title":"ResponseData#content","link":"content","description":"

Gets the content.

"},{"title":"ResponseData#fromCache","link":"fromCache","description":"

Gets the value indicating whether the data is retrieved from cache.

"},{"title":"ResponseData#headerSize","link":"headerSize","description":"

Get the size of the headers.

"},{"title":"ResponseData#headers","link":"headers","description":"

Get the headers.

"},{"title":"ResponseData#mimeType","link":"mimeType","description":"

The MIME type of the network resource.

"},{"title":"ResponseData#protocol","link":"protocol","description":"

Get the protocol.

"},{"title":"ResponseData#status","link":"status","description":"

Get the HTTP status.

"},{"title":"ResponseData#statusText","link":"statusText","description":"

Gets the status text.

"},{"title":"ResponseData#url","link":"url","description":"

Get the URL.

"},{"title":"ResponseStarted","link":"ResponseStarted"},{"title":"ResponseStarted#response","link":"response","description":"

Get the response data.

"},{"title":"Result","link":"Result"},{"title":"Result#code","link":"code"},{"title":"Result#signal","link":"signal"},{"title":"Result#toString","link":"toString"},{"title":"ResultOwnership","link":"ResultOwnership","description":"

Enum representing the ownership types.

"},{"title":"ResultOwnership.NONE","link":"NONE"},{"title":"ResultOwnership.ROOT","link":"ROOT"},{"title":"SameSite","link":"SameSite","description":"

Represents the possible values for the SameSite attribute of a cookie.

"},{"title":"SameSite.LAX","link":"LAX"},{"title":"SameSite.NONE","link":"NONE"},{"title":"SameSite.STRICT","link":"STRICT"},{"title":"SameSite.findByName","link":"findByName"},{"title":"ScriptManager","link":"ScriptManager"},{"title":"ScriptManager#addPreloadScript","link":"addPreloadScript","description":"

Adds a preload script.

"},{"title":"ScriptManager#callFunctionInBrowsingContext","link":"callFunctionInBrowsingContext","description":"

Calls a function in the specified browsing context.

"},{"title":"ScriptManager#callFunctionInRealm","link":"callFunctionInRealm","description":"

Calls a function in the specified realm.

"},{"title":"ScriptManager#disownBrowsingContextScript","link":"disownBrowsingContextScript","description":"

Disowns the handles in the specified browsing context.

"},{"title":"ScriptManager#disownRealmScript","link":"disownRealmScript","description":"

Disowns the handles in the specified realm.

"},{"title":"ScriptManager#evaluateFunctionInBrowsingContext","link":"evaluateFunctionInBrowsingContext","description":"

Evaluates a function in the browsing context.

"},{"title":"ScriptManager#evaluateFunctionInRealm","link":"evaluateFunctionInRealm","description":"

Evaluates a function in the specified realm.

"},{"title":"ScriptManager#getAllRealms","link":"getAllRealms","description":"

Retrieves all realms.

"},{"title":"ScriptManager#getRealmsByType","link":"getRealmsByType","description":"

Retrieves the realms by type.

"},{"title":"ScriptManager#getRealmsInBrowsingContext","link":"getRealmsInBrowsingContext","description":"

Retrieves the realms in the specified browsing context.

"},{"title":"ScriptManager#getRealmsInBrowsingContextByType","link":"getRealmsInBrowsingContextByType","description":"

Retrieves the realms in a browsing context based on the specified type.

"},{"title":"ScriptManager#onMessage","link":"onMessage","description":"

Subscribes to the 'script.message' event and handles the callback function when a message is received.

"},{"title":"ScriptManager#onRealmCreated","link":"onRealmCreated","description":"

Subscribes to the 'script.realmCreated' event and handles it with the provided callback.

"},{"title":"ScriptManager#onRealmDestroyed","link":"onRealmDestroyed","description":"

Subscribes to the 'script.realmDestroyed' event and handles it with the provided callback function.

"},{"title":"ScriptManager#removePreloadScript","link":"removePreloadScript","description":"

Removes a preload script.

"},{"title":"ScriptTimeoutError","link":"ScriptTimeoutError"},{"title":"Select","link":"Select","description":"

Create an Select Element

"},{"title":"Select#deselectAll","link":"deselectAll","description":"

Deselects all selected options

"},{"title":"Select#deselectByIndex","link":"deselectByIndex"},{"title":"Select#deselectByValue","link":"deselectByValue"},{"title":"Select#deselectByVisibleText","link":"deselectByVisibleText"},{"title":"Select#getAllSelectedOptions","link":"getAllSelectedOptions","description":"

Returns a list of all selected options belonging to this select tag

"},{"title":"Select#getFirstSelectedOption","link":"getFirstSelectedOption","description":"

Returns first Selected Option

"},{"title":"Select#getOptions","link":"getOptions","description":"

Returns a list of all options belonging to this select tag

"},{"title":"Select#isMultiple","link":"isMultiple","description":"

Returns a boolean value if the select tag is multiple

"},{"title":"Select#selectByIndex","link":"selectByIndex","description":"

Select option with specified index.

\n\n \n const selectBox = await driver.findElement(By.id(\"selectbox\"));\n await selectObject.selectByIndex(1);\n"},{"title":"Select#selectByValue","link":"selectByValue","description":"

Select option by specific value.

\n\n \n const selectBox = await driver.findElement(By.id(\"selectbox\"));\n await selectObject.selectByVisibleText(\"Option 2\");\n"},{"title":"Select#selectByVisibleText","link":"selectByVisibleText","description":"

Select option with displayed text matching the argument.

\n\n \n const selectBox = await driver.findElement(By.id(\"selectbox\"));\n await selectObject.selectByVisibleText(\"Option 2\");\n"},{"title":"SeleniumServer","link":"SeleniumServer"},{"title":"SeleniumServer.Options","link":"Options"},{"title":"SeleniumServer.Options#args","link":"args","description":"

The arguments to pass to the service. If a promise is provided,\nthe service will wait for it to resolve before starting.

"},{"title":"SeleniumServer.Options#env","link":"env","description":"

The environment variables that should be visible to the server\nprocess. Defaults to inheriting the current process's environment.

"},{"title":"SeleniumServer.Options#jvmArgs","link":"jvmArgs","description":"

The arguments to pass to the JVM. If a promise is provided,\nthe service will wait for it to resolve before starting.

"},{"title":"SeleniumServer.Options#loopback","link":"loopback","description":"

Whether the server should only be accessible on this host's loopback\naddress.

"},{"title":"SeleniumServer.Options#port","link":"port","description":"

The port to start the server on (must be > 0). If the port is provided as\na promise, the service will wait for the promise to resolve before\nstarting.

"},{"title":"SeleniumServer.Options#stdio","link":"stdio","description":"

IO configuration for the spawned server process. If unspecified, IO will\nbe ignored.

"},{"title":"SerializationOptions","link":"SerializationOptions","description":"

Constructs a new instance of SerializationOptions.

"},{"title":"Server","link":"Server","description":"

Encapsulates a simple HTTP server for testing. The {@code onrequest}\nfunction should be overridden to define request handling behavior.

"},{"title":"Server#address","link":"address"},{"title":"Server#host","link":"host","description":"

return {string} The host:port of this server.

"},{"title":"Server#start","link":"start","description":"

Starts the server on the given port. If no port, or 0, is provided,\nthe server will be started on a random port.

"},{"title":"Server#stop","link":"stop","description":"

Stops the server.

"},{"title":"Server#url","link":"url","description":"

Formats a URL for this server.

"},{"title":"Server~Host","link":"Host"},{"title":"ServiceOptions","link":"ServiceOptions","description":"

A record object that defines the configuration options for a DriverService\ninstance.

"},{"title":"ServiceOptions#args","link":"args","description":"

The arguments to pass to the service. If a promise is provided, the service\nwill wait for it to resolve before starting.

"},{"title":"ServiceOptions#env","link":"env","description":"

The environment variables that should be visible to the server process.\nDefaults to inheriting the current process's environment.

"},{"title":"ServiceOptions#hostname","link":"hostname","description":"

The host name to access the server on. If this option is specified, the\n{@link #loopback} option will be ignored.

"},{"title":"ServiceOptions#loopback","link":"loopback","description":"

Whether the service should only be accessed on this host's loopback address.

"},{"title":"ServiceOptions#path","link":"path","description":"

The base path on the server for the WebDriver wire protocol (e.g. '/wd/hub').\nDefaults to '/'.

"},{"title":"ServiceOptions#port","link":"port","description":"

The port to start the server on (must be > 0). If the port is provided as a\npromise, the service will wait for the promise to resolve before starting.

"},{"title":"ServiceOptions#stdio","link":"stdio","description":"

IO configuration for the spawned server process. For more information, refer\nto the documentation of child_process.spawn.

"},{"title":"Session","link":"Session"},{"title":"Session#getCapabilities","link":"getCapabilities"},{"title":"Session#getCapability","link":"getCapability","description":"

Retrieves the value of a specific capability.

"},{"title":"Session#getId","link":"getId"},{"title":"Session#toJSON","link":"toJSON","description":"

Returns the JSON representation of this object, which is just the string\nsession ID.

"},{"title":"SessionNotCreatedError","link":"SessionNotCreatedError"},{"title":"ShadowRoot","link":"ShadowRoot"},{"title":"ShadowRoot#Symbols.serialize","link":"serialize"},{"title":"ShadowRoot#findElement","link":"findElement","description":"

Schedule a command to find a descendant of this ShadowROot. If the element\ncannot be found, the returned promise will be rejected with a\n{@linkplain error.NoSuchElementError NoSuchElementError}.

\n

The search criteria for an element may be defined using one of the static\nfactories on the {@link by.By} class, or as a short-hand\n{@link ./by.ByHash} object. For example, the following two statements\nare equivalent:

\n
var e1 = shadowroot.findElement(By.id('foo'));\nvar e2 = shadowroot.findElement({id:'foo'});\n
\n

You may also provide a custom locator function, which takes as input this\ninstance and returns a {@link WebElement}, or a promise that will resolve\nto a WebElement. If the returned promise resolves to an array of\nWebElements, WebDriver will use the first element. For example, to find the\nfirst visible link on a page, you could write:

\n
var link = element.findElement(firstVisibleLink);\n\nfunction firstVisibleLink(shadowRoot) {\n  var links = shadowRoot.findElements(By.tagName('a'));\n  return promise.filter(links, function(link) {\n    return link.isDisplayed();\n  });\n}\n
"},{"title":"ShadowRoot#findElements","link":"findElements","description":"

Locates all the descendants of this element that match the given search\ncriteria.

"},{"title":"ShadowRoot.extractId","link":"extractId","description":"

Extracts the encoded ShadowRoot ID from the object.

"},{"title":"ShadowRoot.isId","link":"isId"},{"title":"ShadowRootPromise","link":"ShadowRootPromise"},{"title":"ShadowRootPromise#catch","link":"catch"},{"title":"ShadowRootPromise#getId","link":"getId","description":"

Defers returning the ShadowRoot ID until the wrapped WebElement has been\nresolved.

"},{"title":"ShadowRootPromise#then","link":"then"},{"title":"Source","link":"Source"},{"title":"Source#browsingContextId","link":"browsingContextId","description":"

Get the browsing context ID.

"},{"title":"Source#realmId","link":"realmId","description":"

Get the realm ID.

"},{"title":"SpecialNumberType","link":"SpecialNumberType","description":"

Represents a speacial number type.

"},{"title":"SpecialNumberType.INFINITY","link":"INFINITY"},{"title":"SpecialNumberType.MINUS_INFINITY","link":"MINUS_INFINITY"},{"title":"SpecialNumberType.MINUS_ZERO","link":"MINUS_ZERO"},{"title":"SpecialNumberType.NAN","link":"NAN"},{"title":"StaleElementReferenceError","link":"StaleElementReferenceError"},{"title":"StdIoOptions","link":"StdIoOptions"},{"title":"Storage","link":"Storage"},{"title":"Storage#deleteCookies","link":"deleteCookies","description":"

Deletes cookies based on the provided filter and partition.

"},{"title":"Storage#getCookies","link":"getCookies","description":"

Retrieves cookies based on the provided filter and partition.

"},{"title":"Storage#setCookie","link":"setCookie","description":"

Sets a cookie using the provided cookie object and partition.

"},{"title":"StorageKeyPartitionDescriptor","link":"StorageKeyPartitionDescriptor"},{"title":"StorageKeyPartitionDescriptor#sourceOrigin","link":"sourceOrigin","description":"

Sets the source origin for the partition descriptor.

"},{"title":"StorageKeyPartitionDescriptor#userContext","link":"userContext","description":"

Sets the user context for the partition descriptor.

"},{"title":"SuiteOptions","link":"SuiteOptions","description":"

Configuration options for a {@linkplain ./index.suite test suite}.

"},{"title":"SuiteOptions#browsers","link":"browsers","description":"

The browsers to run the test suite against.

"},{"title":"THENABLE_DRIVERS","link":"THENABLE_DRIVERS"},{"title":"TargetBrowser","link":"TargetBrowser","description":"

Describes a browser targeted by a {@linkplain suite test suite}.

"},{"title":"TargetBrowser#name","link":"name","description":"

The {@linkplain Browser name} of the targeted browser.

"},{"title":"TargetBrowser#platform","link":"platform","description":"

The specific {@linkplain ../lib/capabilities.Platform platform} for the\ntargeted browser, if any.

"},{"title":"TargetBrowser#version","link":"version","description":"

The specific version of the targeted browser, if any.

"},{"title":"TargetLocator#activeElement","link":"activeElement","description":"

Locates the DOM element on the current page that corresponds to\ndocument.activeElement or document.body if the active element is not\navailable.

"},{"title":"TargetLocator#alert","link":"alert","description":"

Changes focus to the active modal dialog, such as those opened by\nwindow.alert(), window.confirm(), and window.prompt(). The returned\npromise will be rejected with a\n{@linkplain error.NoSuchAlertError} if there are no open alerts.

"},{"title":"TargetLocator#defaultContent","link":"defaultContent","description":"

Switches focus of all future commands to the topmost frame in the current\nwindow.

"},{"title":"TargetLocator#frame","link":"frame","description":"

Changes the focus of all future commands to another frame on the page. The\ntarget frame may be specified as one of the following:

\n
    \n
  • A number that specifies a (zero-based) index into window.frames.
  • \n
  • A {@link WebElement} reference, which correspond to a frame or iframe\nDOM element.
  • \n
  • The null value, to select the topmost frame on the page. Passing null\nis the same as calling {@link #defaultContent defaultContent()}.
  • \n
\n

If the specified frame can not be found, the returned promise will be\nrejected with a {@linkplain error.NoSuchFrameError}.

"},{"title":"TargetLocator#newWindow","link":"newWindow","description":"

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

"},{"title":"TargetLocator#parentFrame","link":"parentFrame","description":"

Changes the focus of all future commands to the parent frame of the\ncurrently selected frame. This command has no effect if the driver is\nalready focused on the top-level browsing context.

"},{"title":"TargetLocator#window","link":"window","description":"

Changes the focus of all future commands to another window. Windows may be\nspecified by their {@code window.name} attribute or by its handle\n(as returned by {@link WebDriver#getWindowHandles}).

\n

If the specified window cannot be found, the returned promise will be\nrejected with a {@linkplain error.NoSuchWindowError}.

"},{"title":"ThenableWebDriver","link":"ThenableWebDriver"},{"title":"ThenableWebDriver.createSession","link":"createSession"},{"title":"TimeoutError","link":"TimeoutError"},{"title":"Timeouts","link":"Timeouts","description":"

Record object defining the timeouts that apply to certain WebDriver actions.

"},{"title":"Timeouts#implicit","link":"implicit","description":"

The maximum amount of time, in milliseconds, to spend attempting to\n{@linkplain ./webdriver.IWebDriver#findElement locate} an element on the\ncurrent page.

"},{"title":"Timeouts#pageLoad","link":"pageLoad","description":"

The timeout, in milliseconds, to apply to navigation events along with the\n{@link PageLoadStrategy}.

"},{"title":"Timeouts#script","link":"script","description":"

Defines when, in milliseconds, to interrupt a script that is being\n{@linkplain ./webdriver.IWebDriver#executeScript evaluated}.

"},{"title":"Transport","link":"Transport","description":"

AuthenticatorTransport values

"},{"title":"Transport.BLE","link":"BLE"},{"title":"Transport.INTERNAL","link":"INTERNAL"},{"title":"Transport.NFC","link":"NFC"},{"title":"Transport.USB","link":"USB"},{"title":"Type","link":"Type","description":"

Represents the types of partition descriptors.

"},{"title":"Type","link":"Type","description":"

Common log types.

"},{"title":"Type","link":"Type","description":"

Supported {@linkplain Config proxy configuration} types.

"},{"title":"Type","link":"Type"},{"title":"Type.AUTODETECT","link":"AUTODETECT"},{"title":"Type.BROWSER","link":"BROWSER","description":"

Logs originating from the browser.

"},{"title":"Type.CLIENT","link":"CLIENT","description":"

Logs from a WebDriver client.

"},{"title":"Type.CONTEXT","link":"CONTEXT"},{"title":"Type.DIRECT","link":"DIRECT"},{"title":"Type.DRIVER","link":"DRIVER","description":"

Logs from a WebDriver implementation.

"},{"title":"Type.MANUAL","link":"MANUAL"},{"title":"Type.PAC","link":"PAC"},{"title":"Type.PERFORMANCE","link":"PERFORMANCE","description":"

Logs related to performance.

"},{"title":"Type.SERVER","link":"SERVER","description":"

Logs from the remote server.

"},{"title":"Type.STORAGE_KEY","link":"STORAGE_KEY"},{"title":"Type.SYSTEM","link":"SYSTEM"},{"title":"USER_AGENT","link":"USER_AGENT"},{"title":"UnableToCaptureScreenError","link":"UnableToCaptureScreenError"},{"title":"UnableToSetCookieError","link":"UnableToSetCookieError"},{"title":"UnexpectedAlertOpenError","link":"UnexpectedAlertOpenError"},{"title":"UnexpectedAlertOpenError#getAlertText","link":"getAlertText"},{"title":"UnknownCommandError","link":"UnknownCommandError"},{"title":"UnknownMethodError","link":"UnknownMethodError"},{"title":"UnsupportedOperationError","link":"UnsupportedOperationError"},{"title":"UrlPattern","link":"UrlPattern"},{"title":"UrlPattern#hostname","link":"hostname","description":"

Sets the hostname for the URL pattern.

"},{"title":"UrlPattern#pathname","link":"pathname","description":"

Sets the pathname for the URL pattern.

"},{"title":"UrlPattern#port","link":"port","description":"

Sets the port for the URL pattern.

"},{"title":"UrlPattern#protocol","link":"protocol","description":"

Sets the protocol for the URL pattern.

"},{"title":"UrlPattern#search","link":"search","description":"

Sets the search parameter in the URL pattern.

"},{"title":"UserPromptHandler","link":"UserPromptHandler","description":"

The possible default actions a WebDriver session can take to respond to\nunhandled user prompts (window.alert(), window.confirm(), and\nwindow.prompt()).

"},{"title":"UserPromptHandler.ACCEPT","link":"ACCEPT","description":"

All prompts should be silently accepted.

"},{"title":"UserPromptHandler.ACCEPT_AND_NOTIFY","link":"ACCEPT_AND_NOTIFY","description":"

All prompts should be automatically accepted, but an error should be\nreturned to the next (or currently executing) WebDriver command.

"},{"title":"UserPromptHandler.DISMISS","link":"DISMISS","description":"

All prompts should be silently dismissed.

"},{"title":"UserPromptHandler.DISMISS_AND_NOTIFY","link":"DISMISS_AND_NOTIFY","description":"

All prompts should be automatically dismissed, but an error should be\nreturned to the next (or currently executing) WebDriver command.

"},{"title":"UserPromptHandler.IGNORE","link":"IGNORE","description":"

All prompts should be left unhandled.

"},{"title":"VirtualAuthenticatorOptions","link":"VirtualAuthenticatorOptions","description":"

Constructor to initialise VirtualAuthenticatorOptions object.

"},{"title":"W3C_COMMAND_MAP","link":"W3C_COMMAND_MAP"},{"title":"WebDriver","link":"WebDriver"},{"title":"WebDriver#actions","link":"actions","description":"

Creates a new action sequence using this driver. The sequence will not be\nsubmitted for execution until\n{@link ./input.Actions#perform Actions.perform()} is called.

"},{"title":"WebDriver#addCredential","link":"addCredential","description":"

Injects a credential into the authenticator.

"},{"title":"WebDriver#addVirtualAuthenticator","link":"addVirtualAuthenticator","description":"

Adds a virtual authenticator with the given options.

"},{"title":"WebDriver#close","link":"close","description":"

Closes the current window.

"},{"title":"WebDriver#createCDPConnection","link":"createCDPConnection","description":"

Creates a new WebSocket connection.

"},{"title":"WebDriver#execute","link":"execute","description":"

Executes the provided {@link command.Command} using this driver's\n{@link command.Executor}.

"},{"title":"WebDriver#executeAsyncScript","link":"executeAsyncScript","description":"

Executes a snippet of asynchronous JavaScript in the context of the\ncurrently selected frame or window. The script fragment will be executed as\nthe body of an anonymous function. If the script is provided as a function\nobject, that function will be converted to a string for injection into the\ntarget window.

\n

Any arguments provided in addition to the script will be included as script\narguments and may be referenced using the arguments object. Arguments may\nbe a boolean, number, string, or {@linkplain WebElement}. Arrays and\nobjects may also be used as script arguments as long as each item adheres\nto the types previously mentioned.

\n

Unlike executing synchronous JavaScript with {@link #executeScript},\nscripts executed with this function must explicitly signal they are\nfinished by invoking the provided callback. This callback will always be\ninjected into the executed function as the last argument, and thus may be\nreferenced with arguments[arguments.length - 1]. The following steps\nwill be taken for resolving this functions return value against the first\nargument to the script's callback function:

\n
    \n
  • For a HTML element, the value will resolve to a {@link WebElement}
  • \n
  • Null and undefined return values will resolve to null
  • \n
  • Booleans, numbers, and strings will resolve as is
  • \n
  • Functions will resolve to their string representation
  • \n
  • For arrays and objects, each member item will be converted according to\nthe rules above
  • \n
\n

Example #1: Performing a sleep that is synchronized with the currently\nselected window:

\n
var start = new Date().getTime();\ndriver.executeAsyncScript(\n    'window.setTimeout(arguments[arguments.length - 1], 500);').\n    then(function() {\n      console.log(\n          'Elapsed time: ' + (new Date().getTime() - start) + ' ms');\n    });\n
\n

Example #2: Synchronizing a test with an AJAX application:

\n
var button = driver.findElement(By.id('compose-button'));\nbutton.click();\ndriver.executeAsyncScript(\n    'var callback = arguments[arguments.length - 1];' +\n    'mailClient.getComposeWindowWidget().onload(callback);');\ndriver.switchTo().frame('composeWidget');\ndriver.findElement(By.id('to')).sendKeys('dog@example.com');\n
\n

Example #3: Injecting a XMLHttpRequest and waiting for the result. In\nthis example, the inject script is specified with a function literal. When\nusing this format, the function is converted to a string for injection, so\nit should not reference any symbols not defined in the scope of the page\nunder test.

\n
driver.executeAsyncScript(function() {\n  var callback = arguments[arguments.length - 1];\n  var xhr = new XMLHttpRequest();\n  xhr.open("GET", "/resource/data.json", true);\n  xhr.onreadystatechange = function() {\n    if (xhr.readyState == 4) {\n      callback(xhr.responseText);\n    }\n  };\n  xhr.send('');\n}).then(function(str) {\n  console.log(JSON.parse(str)['food']);\n});\n
"},{"title":"WebDriver#executeScript","link":"executeScript","description":"

Executes a snippet of JavaScript in the context of the currently selected\nframe or window. The script fragment will be executed as the body of an\nanonymous function. If the script is provided as a function object, that\nfunction will be converted to a string for injection into the target\nwindow.

\n

Any arguments provided in addition to the script will be included as script\narguments and may be referenced using the arguments object. Arguments may\nbe a boolean, number, string, or {@linkplain WebElement}. Arrays and\nobjects may also be used as script arguments as long as each item adheres\nto the types previously mentioned.

\n

The script may refer to any variables accessible from the current window.\nFurthermore, the script will execute in the window's context, thus\ndocument may be used to refer to the current document. Any local\nvariables will not be available once the script has finished executing,\nthough global variables will persist.

\n

If the script has a return value (i.e. if the script contains a return\nstatement), then the following steps will be taken for resolving this\nfunctions return value:

\n
    \n
  • For a HTML element, the value will resolve to a {@linkplain WebElement}
  • \n
  • Null and undefined return values will resolve to null
  • \n
  • Booleans, numbers, and strings will resolve as is
  • \n
  • Functions will resolve to their string representation
  • \n
  • For arrays and objects, each member item will be converted according to\nthe rules above
  • \n
"},{"title":"WebDriver#findElement","link":"findElement","description":"

Locates an element on the page. If the element cannot be found, a\n{@link error.NoSuchElementError} will be returned by the driver.

\n

This function should not be used to test whether an element is present on\nthe page. Rather, you should use {@link #findElements}:

\n
driver.findElements(By.id('foo'))\n    .then(found => console.log('Element found? %s', !!found.length));\n
\n

The search criteria for an element may be defined using one of the\nfactories in the {@link webdriver.By} namespace, or as a short-hand\n{@link webdriver.By.Hash} object. For example, the following two statements\nare equivalent:

\n
var e1 = driver.findElement(By.id('foo'));\nvar e2 = driver.findElement({id:'foo'});\n
\n

You may also provide a custom locator function, which takes as input this\ninstance and returns a {@link WebElement}, or a promise that will resolve\nto a WebElement. If the returned promise resolves to an array of\nWebElements, WebDriver will use the first element. For example, to find the\nfirst visible link on a page, you could write:

\n
var link = driver.findElement(firstVisibleLink);\n\nfunction firstVisibleLink(driver) {\n  var links = driver.findElements(By.tagName('a'));\n  return promise.filter(links, function(link) {\n    return link.isDisplayed();\n  });\n}\n
"},{"title":"WebDriver#findElements","link":"findElements","description":"

Search for multiple elements on the page. Refer to the documentation on\n{@link #findElement(by)} for information on element locator strategies.

"},{"title":"WebDriver#get","link":"get","description":"

Navigates to the given URL.

"},{"title":"WebDriver#getAllWindowHandles","link":"getAllWindowHandles","description":"

Retrieves a list of all available window handles.

"},{"title":"WebDriver#getBidi","link":"getBidi","description":"

Initiates bidi connection using 'webSocketUrl'

"},{"title":"WebDriver#getCapabilities","link":"getCapabilities"},{"title":"WebDriver#getCredentials","link":"getCredentials"},{"title":"WebDriver#getCurrentUrl","link":"getCurrentUrl","description":"

Retrieves the URL for the current page.

"},{"title":"WebDriver#getExecutor","link":"getExecutor"},{"title":"WebDriver#getPageSource","link":"getPageSource","description":"

Retrieves the current page's source. The returned source is a representation\nof the underlying DOM: do not expect it to be formatted or escaped in the\nsame way as the raw response sent from the web server.

"},{"title":"WebDriver#getSession","link":"getSession"},{"title":"WebDriver#getTitle","link":"getTitle","description":"

Retrieves the current page title.

"},{"title":"WebDriver#getWindowHandle","link":"getWindowHandle","description":"

Retrieves the current window handle.

"},{"title":"WebDriver#getWsUrl","link":"getWsUrl","description":"

Retrieves 'webSocketDebuggerUrl' by sending a http request using debugger address

"},{"title":"WebDriver#logMutationEvents","link":"logMutationEvents"},{"title":"WebDriver#manage","link":"manage"},{"title":"WebDriver#navigate","link":"navigate"},{"title":"WebDriver#normalize_","link":"normalize_"},{"title":"WebDriver#onIntercept","link":"onIntercept","description":"

Handle Network interception requests

"},{"title":"WebDriver#onLogEvent","link":"onLogEvent"},{"title":"WebDriver#onLogException","link":"onLogException"},{"title":"WebDriver#printPage","link":"printPage","description":"

Takes a PDF of the current page. The driver makes a best effort to\nreturn a PDF based on the provided parameters.

"},{"title":"WebDriver#quit","link":"quit","description":"

Terminates the browser session. After calling quit, this instance will be\ninvalidated and may no longer be used to issue commands against the\nbrowser.

"},{"title":"WebDriver#register","link":"register","description":"

Sets a listener for Fetch.authRequired event from CDP\nIf event is triggered, it enters username and password\nand allows the test to move forward

"},{"title":"WebDriver#removeAllCredentials","link":"removeAllCredentials","description":"

Removes all the credentials from the authenticator.

"},{"title":"WebDriver#removeCredential","link":"removeCredential","description":"

Removes a credential from the authenticator.

"},{"title":"WebDriver#removeVirtualAuthenticator","link":"removeVirtualAuthenticator","description":"

Removes a previously added virtual authenticator. The authenticator is no\nlonger valid after removal, so no methods may be called.

"},{"title":"WebDriver#setFileDetector","link":"setFileDetector","description":"

Sets the {@linkplain input.FileDetector file detector} that should be\nused with this instance.

"},{"title":"WebDriver#setUserVerified","link":"setUserVerified","description":"

Sets whether the authenticator will simulate success or fail on user verification.

"},{"title":"WebDriver#sleep","link":"sleep","description":"

Makes the driver sleep for the given amount of time.

"},{"title":"WebDriver#switchTo","link":"switchTo"},{"title":"WebDriver#takeScreenshot","link":"takeScreenshot","description":"

Takes a screenshot of the current page. The driver makes the best effort to\nreturn a screenshot of the following, in order of preference:

\n
    \n
  1. Entire page
  2. \n
  3. Current window
  4. \n
  5. Visible portion of the current frame
  6. \n
  7. The entire display containing the browser
  8. \n
"},{"title":"WebDriver#virtualAuthenticatorId","link":"virtualAuthenticatorId"},{"title":"WebDriver#wait","link":"wait","description":"

Waits for a condition to evaluate to a "truthy" value. The condition may be\nspecified by a {@link Condition}, as a custom function, or as any\npromise-like thenable.

\n

For a {@link Condition} or function, the wait will repeatedly\nevaluate the condition until it returns a truthy value. If any errors occur\nwhile evaluating the condition, they will be allowed to propagate. In the\nevent a condition returns a {@linkplain Promise}, the polling loop will\nwait for it to be resolved and use the resolved value for whether the\ncondition has been satisfied. The resolution time for a promise is always\nfactored into whether a wait has timed out.

\n

If the provided condition is a {@link WebElementCondition}, then\nthe wait will return a {@link WebElementPromise} that will resolve to the\nelement that satisfied the condition.

\n

Example: waiting up to 10 seconds for an element to be present on the\npage.

\n
async function example() {\n  let button =\n      await driver.wait(until.elementLocated(By.id('foo')), 10000);\n  await button.click();\n}\n
"},{"title":"WebDriver.createSession","link":"createSession","description":"

Creates a new WebDriver session.

\n

This function will always return a WebDriver instance. If there is an error\ncreating the session, such as the aforementioned SessionNotCreatedError,\nthe driver will have a rejected {@linkplain #getSession session} promise.\nThis rejection will propagate through any subsequent commands scheduled\non the returned WebDriver instance.

\n
let required = Capabilities.firefox();\nlet driver = WebDriver.createSession(executor, {required});\n\n// If the createSession operation failed, then this command will also\n// also fail, propagating the creation failure.\ndriver.get('http://www.google.com').catch(e => console.log(e));\n
"},{"title":"WebDriverError","link":"WebDriverError"},{"title":"WebDriverError#name","link":"name"},{"title":"WebDriverError#remoteStacktrace","link":"remoteStacktrace","description":"

A stacktrace reported by the remote webdriver endpoint that initially\nreported this error. This property will be an empty string if the remote\nend did not provide a stacktrace.

"},{"title":"WebElement","link":"WebElement"},{"title":"WebElement#Symbols.serialize","link":"serialize"},{"title":"WebElement#clear","link":"clear","description":"

Clear the value of this element. This command has no effect if the\nunderlying DOM element is neither a text INPUT element nor a TEXTAREA\nelement.

"},{"title":"WebElement#click","link":"click","description":"

Clicks on this element.

"},{"title":"WebElement#findElement","link":"findElement","description":"

Schedule a command to find a descendant of this element. If the element\ncannot be found, the returned promise will be rejected with a\n{@linkplain error.NoSuchElementError NoSuchElementError}.

\n

The search criteria for an element may be defined using one of the static\nfactories on the {@link by.By} class, or as a short-hand\n{@link ./by.ByHash} object. For example, the following two statements\nare equivalent:

\n
var e1 = element.findElement(By.id('foo'));\nvar e2 = element.findElement({id:'foo'});\n
\n

You may also provide a custom locator function, which takes as input this\ninstance and returns a {@link WebElement}, or a promise that will resolve\nto a WebElement. If the returned promise resolves to an array of\nWebElements, WebDriver will use the first element. For example, to find the\nfirst visible link on a page, you could write:

\n
var link = element.findElement(firstVisibleLink);\n\nfunction firstVisibleLink(element) {\n  var links = element.findElements(By.tagName('a'));\n  return promise.filter(links, function(link) {\n    return link.isDisplayed();\n  });\n}\n
"},{"title":"WebElement#findElements","link":"findElements","description":"

Locates all the descendants of this element that match the given search\ncriteria.

"},{"title":"WebElement#getAccessibleName","link":"getAccessibleName","description":"

Get the computed WAI-ARIA label of element.

"},{"title":"WebElement#getAriaRole","link":"getAriaRole","description":"

Get the computed WAI-ARIA role of element.

"},{"title":"WebElement#getAttribute","link":"getAttribute","description":"

Retrieves the current value of the given attribute of this element.\nWill return the current value, even if it has been modified after the page\nhas been loaded. More exactly, this method will return the value\nof the given attribute, unless that attribute is not present, in which case\nthe value of the property with the same name is returned. If neither value\nis set, null is returned (for example, the "value" property of a textarea\nelement). The "style" attribute is converted as best can be to a\ntext representation with a trailing semicolon. The following are deemed to\nbe "boolean" attributes and will return either "true" or null:

\n

async, autofocus, autoplay, checked, compact, complete, controls, declare,\ndefaultchecked, defaultselected, defer, disabled, draggable, ended,\nformnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope,\nloop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open,\npaused, pubdate, readonly, required, reversed, scoped, seamless, seeking,\nselected, spellcheck, truespeed, willvalidate

\n

Finally, the following commonly mis-capitalized attribute/property names\nare evaluated as expected:

\n
    \n
  • "class"
  • \n
  • "readonly"
  • \n
"},{"title":"WebElement#getCssValue","link":"getCssValue","description":"

Retrieves the value of a computed style property for this instance. If\nthe element inherits the named style from its parent, the parent will be\nqueried for its value. Where possible, color values will be converted to\ntheir hex representation (e.g. #00ff00 instead of rgb(0, 255, 0)).

\n

Warning: the value returned will be as the browser interprets it, so\nit may be tricky to form a proper assertion.

"},{"title":"WebElement#getDomAttribute","link":"getDomAttribute","description":"

Get the value of the given attribute of the element.

\n

\nThis method, unlike {@link #getAttribute(String)}, returns the value of the attribute with the\ngiven name but not the property with the same name.\n

\nThe following are deemed to be \"boolean\" attributes, and will return either \"true\" or null:\n

\nasync, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked,\ndefaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate,\niscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade,\nnovalidate, nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless,\nseeking, selected, truespeed, willvalidate\n

\nSee W3C WebDriver specification\nfor more details."},{"title":"WebElement#getDriver","link":"getDriver"},{"title":"WebElement#getId","link":"getId"},{"title":"WebElement#getProperty","link":"getProperty","description":"

Get the given property of the referenced web element

"},{"title":"WebElement#getRect","link":"getRect","description":"

Returns an object describing an element's location, in pixels relative to\nthe document element, and the element's size in pixels.

"},{"title":"WebElement#getShadowRoot","link":"getShadowRoot","description":"

Get the shadow root of the current web element.

"},{"title":"WebElement#getTagName","link":"getTagName","description":"

Retrieves the element's tag name.

"},{"title":"WebElement#getText","link":"getText","description":"

Get the visible (i.e. not hidden by CSS) innerText of this element,\nincluding sub-elements, without any leading or trailing whitespace.

"},{"title":"WebElement#isDisplayed","link":"isDisplayed","description":"

Test whether this element is currently displayed.

"},{"title":"WebElement#isEnabled","link":"isEnabled","description":"

Tests whether this element is enabled, as dictated by the disabled\nattribute.

"},{"title":"WebElement#isSelected","link":"isSelected","description":"

Tests whether this element is selected.

"},{"title":"WebElement#sendKeys","link":"sendKeys","description":"

Types a key sequence on the DOM element represented by this instance.

\n

Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is\nprocessed in the key sequence, that key state is toggled until one of the\nfollowing occurs:

\n
    \n
  • \n

    The modifier key is encountered again in the sequence. At this point the\nstate of the key is toggled (along with the appropriate keyup/down\nevents).

    \n
  • \n
  • \n

    The {@link input.Key.NULL} key is encountered in the sequence. When\nthis key is encountered, all modifier keys current in the down state are\nreleased (with accompanying keyup events). The NULL key can be used to\nsimulate common keyboard shortcuts:

    \n
      element.sendKeys("text was",\n                   Key.CONTROL, "a", Key.NULL,\n                   "now text is");\n  // Alternatively:\n  element.sendKeys("text was",\n                   Key.chord(Key.CONTROL, "a"),\n                   "now text is");\n
    \n
  • \n
  • \n

    The end of the key sequence is encountered. When there are no more keys\nto type, all depressed modifier keys are released (with accompanying\nkeyup events).

    \n
  • \n
\n

If this element is a file input ({@code }), the\nspecified key sequence should specify the path to the file to attach to\nthe element. This is analogous to the user clicking "Browse..." and entering\nthe path into the file select dialog.

\n
var form = driver.findElement(By.css('form'));\nvar element = form.findElement(By.css('input[type=file]'));\nelement.sendKeys('/path/to/file.txt');\nform.submit();\n
\n

For uploads to function correctly, the entered path must reference a file\non the browser's machine, not the local machine running this script. When\nrunning against a remote Selenium server, a {@link input.FileDetector}\nmay be used to transparently copy files to the remote machine before\nattempting to upload them in the browser.

\n

Note: On browsers where native keyboard events are not supported\n(e.g. Firefox on OS X), key events will be synthesized. Special\npunctuation keys will be synthesized according to a standard QWERTY en-us\nkeyboard layout.

"},{"title":"WebElement#submit","link":"submit","description":"

Submits the form containing this element (or this element if it is itself\na FORM element). his command is a no-op if the element is not contained in\na form.

"},{"title":"WebElement#takeScreenshot","link":"takeScreenshot","description":"

Take a screenshot of the visible region encompassed by this element's\nbounding rectangle.

"},{"title":"WebElement.buildId","link":"buildId"},{"title":"WebElement.equals","link":"equals","description":"

Compares two WebElements for equality.

"},{"title":"WebElement.extractId","link":"extractId","description":"

Extracts the encoded WebElement ID from the object.

"},{"title":"WebElement.isId","link":"isId"},{"title":"WebElementCondition","link":"WebElementCondition"},{"title":"WebElementPromise","link":"WebElementPromise"},{"title":"WebElementPromise#catch","link":"catch"},{"title":"WebElementPromise#getId","link":"getId","description":"

Defers returning the element ID until the wrapped WebElement has been\nresolved.

"},{"title":"WebElementPromise#then","link":"then"},{"title":"Wheel","link":"Wheel"},{"title":"Wheel#scroll","link":"scroll","description":"

Scrolls a page via the coordinates given

"},{"title":"Window#fullscreen","link":"fullscreen","description":"

Invokes the "full screen" operation on the current window. The exact\nbehavior of this command is specific to individual window managers, but\nthis will typically increase the window size to the size of the physical\ndisplay and hide the browser chrome.

"},{"title":"Window#getRect","link":"getRect","description":"

Retrieves a rect describing the current top-level window's size and\nposition.

"},{"title":"Window#getSize","link":"getSize","description":"

Gets the width and height of the current window

"},{"title":"Window#maximize","link":"maximize","description":"

Maximizes the current window. The exact behavior of this command is\nspecific to individual window managers, but typically involves increasing\nthe window to the maximum available size without going full-screen.

"},{"title":"Window#minimize","link":"minimize","description":"

Minimizes the current window. The exact behavior of this command is\nspecific to individual window managers, but typically involves hiding\nthe window in the system tray.

"},{"title":"Window#setRect","link":"setRect","description":"

Sets the current top-level window's size and position. You may update just\nthe size by omitting x & y, or just the position by omitting\nwidth & height options.

"},{"title":"Window#setSize","link":"setSize","description":"

Sets the width and height of the current window. (window.resizeTo)

"},{"title":"WindowRealmInfo","link":"WindowRealmInfo","description":"

Constructs a new instance of the WindowRealmInfo class.

"},{"title":"Zip","link":"Zip"},{"title":"Zip#addDir","link":"addDir","description":"

Recursively adds a directory and all of its contents to this archive.

"},{"title":"Zip#addFile","link":"addFile","description":"

Adds a file to this zip.

"},{"title":"Zip#getFile","link":"getFile","description":"

Returns the contents of the file in this zip archive with the given path.\nThe returned promise will be rejected with an {@link InvalidArgumentError}\nif either path does not exist within the archive, or if path refers\nto a directory.

"},{"title":"Zip#has","link":"has"},{"title":"Zip#toBuffer","link":"toBuffer","description":"

Returns the compressed data for this archive in a buffer. This method will\nnot wait for any outstanding {@link #addFile add}\n{@link #addDir operations} before encoding the archive.

"},{"title":"ableToSwitchToFrame","link":"ableToSwitchToFrame","description":"

Creates a condition that will wait until the input driver is able to switch\nto the designated frame. The target frame may be specified as

\n
    \n
  1. a numeric index into\nwindow.frames\nfor the currently selected frame.
  2. \n
  3. a {@link ./webdriver.WebElement}, which must reference a FRAME or IFRAME\nelement on the current page.
  4. \n
  5. a locator which may be used to first locate a FRAME or IFRAME on the\ncurrent page before attempting to switch to it.
  6. \n
\n

Upon successful resolution of this condition, the driver will be left\nfocused on the new frame.

"},{"title":"addConsoleHandler","link":"addConsoleHandler","description":"

Adds the console handler to the given logger. The console handler will log\nall messages using the JavaScript Console API.

"},{"title":"alertIsPresent","link":"alertIsPresent","description":"

Creates a condition that waits for an alert to be opened. Upon success, the\nreturned promise will be fulfilled with the handle for the opened alert.

"},{"title":"arraysEqual","link":"arraysEqual","description":"

Checks if the two arrays are equal or not. Conditions to check are:

\n
    \n
  1. If the length of both arrays is equal
  2. \n
  3. If all elements of array1 are present in array2
  4. \n
  5. If all elements of array2 are present in array1
  6. \n
"},{"title":"binaryPaths","link":"binaryPaths","description":"

Determines the path of the correct driver

"},{"title":"buildPath","link":"buildPath","description":"

Builds a fully qualified path using the given set of command parameters. Each\npath segment prefixed with ':' will be replaced by the value of the\ncorresponding parameter. All parameters spliced into the path will be\nremoved from the parameter map.

"},{"title":"buildRequest","link":"buildRequest"},{"title":"buildRequest~toHttpRequest","link":"toHttpRequest"},{"title":"builtTargets","link":"builtTargets","description":"

Targets that have been previously built.

"},{"title":"check","link":"check","description":"

Checks if a value is a valid locator.

"},{"title":"checkCodePoint","link":"checkCodePoint"},{"title":"checkLegacyResponse","link":"checkLegacyResponse","description":"

Checks a legacy response from the Selenium 2.0 wire protocol for an error.

"},{"title":"checkOptions","link":"checkOptions","description":"

In the 3.x releases, the various browser option classes\n(e.g. firefox.Options) had to be manually set as an option using the\nCapabilities class:

\n
let ffo = new firefox.Options();\n// Configure firefox options...\n\nlet caps = new Capabilities();\ncaps.set('moz:firefoxOptions', ffo);\n\nlet driver = new Builder()\n    .withCapabilities(caps)\n    .build();\n
\n

The options are now subclasses of Capabilities and can be used directly. A\ndirect translation of the above is:

\n
let ffo = new firefox.Options();\n// Configure firefox options...\n\nlet driver = new Builder()\n    .withCapabilities(ffo)\n    .build();\n
\n

You can also set the options for various browsers at once and let the builder\nchoose the correct set at runtime (see Builder docs above):

\n
let ffo = new firefox.Options();\n// Configure ...\n\nlet co = new chrome.Options();\n// Configure ...\n\nlet driver = new Builder()\n    .setChromeOptions(co)\n    .setFirefoxOptions(ffo)\n    .build();\n
"},{"title":"checkedCall","link":"checkedCall"},{"title":"checkedNodeCall","link":"checkedNodeCall","description":"

Wraps a function that expects a node-style callback as its final\nargument. This callback expects two arguments: an error value (which will be\nnull if the call succeeded), and the success value as the second argument.\nThe callback will the resolve or reject the returned promise, based on its\narguments.

"},{"title":"color","link":"color"},{"title":"consoleHandler","link":"consoleHandler","description":"

Logs all messages to the Console API.

"},{"title":"copy","link":"copy","description":"

Copies one file to another.

"},{"title":"copyDir","link":"copyDir","description":"

Recursively copies the contents of one directory to another.

"},{"title":"createDriver","link":"createDriver"},{"title":"createDriver~thenableWebDriverProxy","link":"thenableWebDriverProxy"},{"title":"createDriver~thenableWebDriverProxy#catch","link":"catch"},{"title":"createDriver~thenableWebDriverProxy#then","link":"then"},{"title":"delayed","link":"delayed","description":"

Creates a promise that will be resolved at a set time in the future.

"},{"title":"direct","link":"direct","description":"

Configures WebDriver to bypass all browser proxies.

"},{"title":"elementIsDisabled","link":"elementIsDisabled","description":"

Creates a condition that will wait for the given element to be disabled.

"},{"title":"elementIsEnabled","link":"elementIsEnabled","description":"

Creates a condition that will wait for the given element to be enabled.

"},{"title":"elementIsNotSelected","link":"elementIsNotSelected","description":"

Creates a condition that will wait for the given element to be deselected.

"},{"title":"elementIsNotVisible","link":"elementIsNotVisible","description":"

Creates a condition that will wait for the given element to be in the DOM,\nyet not visible to the user.

"},{"title":"elementIsSelected","link":"elementIsSelected","description":"

Creates a condition that will wait for the given element to be selected.

"},{"title":"elementIsVisible","link":"elementIsVisible","description":"

Creates a condition that will wait for the given element to become visible.

"},{"title":"elementLocated","link":"elementLocated","description":"

Creates a condition that will loop until an element is\n{@link ./webdriver.WebDriver#findElement found} with the given locator.

"},{"title":"elementTextContains","link":"elementTextContains","description":"

Creates a condition that will wait for the given element's\n{@link webdriver.WebDriver#getText visible text} to contain the given\nsubstring.

"},{"title":"elementTextIs","link":"elementTextIs","description":"

Creates a condition that will wait for the given element's\n{@link webdriver.WebDriver#getText visible text} to match the given\n{@code text} exactly.

"},{"title":"elementTextMatches","link":"elementTextMatches","description":"

Creates a condition that will wait for the given element's\n{@link webdriver.WebDriver#getText visible text} to match a regular\nexpression.

"},{"title":"elementsLocated","link":"elementsLocated","description":"

Creates a condition that will loop until at least one element is\n{@link ./webdriver.WebDriver#findElement found} with the given locator.

"},{"title":"encodeError","link":"encodeError"},{"title":"ensureFileDetectorsAreEnabled","link":"ensureFileDetectorsAreEnabled","description":"

{@linkplain webdriver.WebDriver#setFileDetector WebDriver's setFileDetector}\nmethod uses a non-standard command to transfer files from the local client\nto the remote end hosting the browser. Many of the WebDriver sub-types, like\nthe {@link chrome.Driver} and {@link firefox.Driver}, do not support this\ncommand. Thus, these classes override the setFileDetector to no-op.

\n

This function uses a mixin to re-enable setFileDetector by calling the\noriginal method on the WebDriver prototype directly. This is used only when\nthe builder creates a Chrome or Firefox instance that communicates with a\nremote end (and thus, support for remote file detectors is unknown).

"},{"title":"escapeCss","link":"escapeCss","description":"

Escapes a CSS string.

"},{"title":"exec","link":"exec","description":"

Spawns a child process. The returned {@link Command} may be used to wait\nfor the process result or to send signals to the process.

"},{"title":"executeCommand","link":"executeCommand","description":"

Translates a command to its wire-protocol representation before passing it\nto the given executor for execution.

"},{"title":"exists","link":"exists","description":"

Tests if a file path exists.

"},{"title":"extractId","link":"extractId","description":"

Extracts the encoded WebElement ID from the object.

"},{"title":"filter","link":"filter","description":"

Calls a function for each element in an array, and if the function returns\ntrue adds the element to a new array.

\n

If the return value of the filter function is a promise, this function\nwill wait for it to be fulfilled before determining whether to insert the\nelement into the new array.

\n

If the filter function throws or returns a rejected promise, the promise\nreturned by this function will be rejected with the same reason. Only the\nfirst failure will be reported; all subsequent errors will be silently\nignored.

"},{"title":"filterNonW3CCaps","link":"filterNonW3CCaps"},{"title":"findFreePort","link":"findFreePort"},{"title":"findInPath","link":"findInPath","description":"

Searches the {@code PATH} environment variable for the given file.

"},{"title":"formatSpawnArgs","link":"formatSpawnArgs"},{"title":"fromWireValue","link":"fromWireValue","description":"

Converts a value from its JSON representation according to the WebDriver wire\nprotocol. Any JSON object that defines a WebElement ID will be decoded to a\n{@link WebElement} object. All other values will be passed through as is.

"},{"title":"fullyResolveKeys","link":"fullyResolveKeys"},{"title":"fullyResolved","link":"fullyResolved","description":"

Returns a promise that will be resolved with the input value in a\nfully-resolved state. If the value is an array, each element will be fully\nresolved. Likewise, if the value is an object, all keys will be fully\nresolved. In both cases, all nested arrays and objects will also be\nfully resolved. All fields are resolved in place; the returned promise will\nresolve on {@code value} and not a copy.

\n

Warning: This function makes no checks against objects that contain\ncyclical references:

\n
var value = {};\nvalue['self'] = value;\npromise.fullyResolved(value);  // Stack overflow.\n
"},{"title":"getAddress","link":"getAddress","description":"

Retrieves the external IP address for this host.

"},{"title":"getAvailableBrowsers","link":"getAvailableBrowsers"},{"title":"getBinary","link":"getBinary","description":"

Determines the path of the correct Selenium Manager binary

"},{"title":"getBinaryPaths","link":"getBinaryPaths","description":"

Determines the path of the correct Selenium Manager binary

"},{"title":"getBrowsersToTestFromEnv","link":"getBrowsersToTestFromEnv","description":"

Extracts the browsers for a test suite to target from the SELENIUM_BROWSER\nenvironment variable.

"},{"title":"getBrowsingContextInstance","link":"getBrowsingContextInstance","description":"

initiate browsing context instance and return

"},{"title":"getIPAddress","link":"getIPAddress","description":"

Queries the system network interfaces for an IP address.

"},{"title":"getJavaPath","link":"getJavaPath","description":"

returns path to java or 'java' string if JAVA_HOME does not exist in env obj

"},{"title":"getLevel","link":"getLevel","description":"

Converts a level name or value to a {@link Level} value. If the name/value\nis not recognized, {@link Level.ALL} will be returned.

"},{"title":"getLogInspectorInstance","link":"getLogInspectorInstance","description":"

initiate inspector instance and return

"},{"title":"getLogger","link":"getLogger","description":"

Retrieves a named logger, creating it in the process. This function will\nimplicitly create the requested logger, and any of its parents, if they\ndo not yet exist.

\n

The log level will be unspecified for newly created loggers. Use\n{@link Logger#setLevel(level)} to explicitly set a level.

"},{"title":"getLoopbackAddress","link":"getLoopbackAddress","description":"

Retrieves a loopback address for this machine.

"},{"title":"getRequestOptions","link":"getRequestOptions"},{"title":"getStatus","link":"getStatus","description":"

Queries a WebDriver server for its current status.

"},{"title":"getTestHook","link":"getTestHook"},{"title":"headersToString","link":"headersToString","description":"

Converts a headers map to a HTTP header block string.

"},{"title":"http/index.js","link":"http/index.js","description":"

Defines an {@linkplain cmd.Executor command executor} that\ncommunicates with a remote end using HTTP + JSON.

"},{"title":"http/util.js","link":"http/util.js","description":"

Various HTTP utilities.

"},{"title":"ignore","link":"ignore","description":"

Returns an object with wrappers for the standard mocha/jasmine test\nfunctions: describe and it, which will redirect to xdescribe and xit,\nrespectively, if provided predicate function returns false.

\n

Sample usage:

\n
const {Browser} = require('selenium-webdriver');\nconst {suite, ignore} = require('selenium-webdriver/testing');\n\nsuite(function(env) {\n\n    // Skip tests the current environment targets Chrome.\n    ignore(env.browsers(Browser.CHROME)).\n    describe('something', async function() {\n      let driver = await env.builder().build();\n      // etc.\n    });\n});\n
"},{"title":"index.js","link":"index.js","description":"

The main user facing module. Exports WebDriver's primary\npublic API and provides convenience assessors to certain sub-modules.

"},{"title":"init","link":"init","description":"

Initializes this module by determining which browsers a\n{@linkplain ./index.suite test suite} should run against. The default\nbehavior is to run tests against every browser with a WebDriver executables\n(chromedriver, firefoxdriver, etc.) are installed on the system by PATH.

\n

Specific browsers can be selected at runtime by setting the\nSELENIUM_BROWSER environment variable. This environment variable has the\nsame semantics as with the WebDriver {@link ../index.Builder Builder},\nexcept you may use a comma-delimited list to run against multiple browsers:

\n
SELENIUM_BROWSER=chrome,firefox mocha --recursive tests/\n
\n

The SELENIUM_REMOTE_URL environment variable may be set to configure tests\nto run against an externally managed (usually remote) Selenium server. When\nset, the WebDriver builder provided by each\n{@linkplain TestEnvironment#builder TestEnvironment} will automatically be\nconfigured to use this server instead of starting a browser driver locally.

\n

The SELENIUM_SERVER_JAR environment variable may be set to the path of a\nstandalone Selenium server on the local machine that should be used for\nWebDriver sessions. When set, the WebDriver builder provided by each\n{@linkplain TestEnvironment} will automatically be configured to use the\nstarted server instead of using a browser driver directly. It should only be\nnecessary to set the SELENIUM_SERVER_JAR when testing locally against\nbrowsers not natively supported by the WebDriver\n{@link ../index.Builder Builder}.

\n

When either of the SELENIUM_REMOTE_URL or SELENIUM_SERVER_JAR environment\nvariables are set, the SELENIUM_BROWSER variable must also be set.

"},{"title":"installConsoleHandler","link":"installConsoleHandler","description":"

Installs the console log handler on the root logger.

"},{"title":"isErrorResponse","link":"isErrorResponse","description":"

Tests if the given value is a valid error response object according to the\nW3C WebDriver spec.

"},{"title":"isFree","link":"isFree","description":"

Tests if a port is free.

"},{"title":"isId","link":"isId"},{"title":"isIdle","link":"isIdle"},{"title":"isObject","link":"isObject","description":"

Determines whether a {@code value} should be treated as an object.

"},{"title":"isPromise","link":"isPromise","description":"

Determines whether a {@code value} should be treated as a promise.\nAny object whose "then" property is a function will be considered a promise.

"},{"title":"isRetryableNetworkError","link":"isRetryableNetworkError"},{"title":"isSelenium3x","link":"isSelenium3x"},{"title":"legacyTimeout","link":"legacyTimeout"},{"title":"lib/by.js","link":"lib/by.js","description":"

Factory methods for the supported locator strategies.

"},{"title":"lib/capabilities.js","link":"lib/capabilities.js","description":"

Defines types related to describing the capabilities of a\nWebDriver session.

"},{"title":"lib/command.js","link":"lib/command.js","description":"

Contains several classes for handling commands.

"},{"title":"lib/http.js","link":"lib/http.js","description":"

Defines an environment agnostic {@linkplain cmd.Executor\ncommand executor} that communicates with a remote end using JSON over HTTP.

\n

Clients should implement the {@link Client} interface, which is used by\nthe {@link Executor} to send commands to the remote end.

"},{"title":"lib/input.js","link":"lib/input.js","description":"

Defines types related to user input with the WebDriver API.

"},{"title":"lib/logging.js","link":"lib/logging.js","description":"

Defines WebDriver's logging system. The logging system is\nbroken into major components: local and remote logging.

\n

The local logging API, which is anchored by the {@linkplain Logger} class is\nsimilar to Java's logging API. Loggers, retrieved by\n{@linkplain #getLogger getLogger(name)}, use hierarchical, dot-delimited\nnamespaces (e.g. "" > "webdriver" > "webdriver.logging"). Recorded log\nmessages are represented by the {@linkplain Entry} class. You can capture log\nrecords by {@linkplain Logger#addHandler attaching} a handler function to the\ndesired logger. For convenience, you can quickly enable logging to the\nconsole by simply calling {@linkplain #installConsoleHandler\ninstallConsoleHandler}.

\n

The remote logging API\nallows you to retrieve logs from a remote WebDriver server. This API uses the\n{@link Preferences} class to define desired log levels prior to creating\na WebDriver session:

\n
var prefs = new logging.Preferences();\nprefs.setLevel(logging.Type.BROWSER, logging.Level.DEBUG);\n\nvar caps = Capabilities.chrome();\ncaps.setLoggingPrefs(prefs);\n// ...\n
\n

Remote log entries, also represented by the {@link Entry} class, may be\nretrieved via {@link webdriver.WebDriver.Logs}:

\n
driver.manage().logs().get(logging.Type.BROWSER)\n    .then(function(entries) {\n       entries.forEach(function(entry) {\n         console.log('[%s] %s', entry.level.name, entry.message);\n       });\n    });\n
\n

NOTE: Only a few browsers support the remote logging API (notably\nFirefox and Chrome). Firefox supports basic logging functionality, while\nChrome exposes robust\nperformance logging\noptions. Remote logging is still considered a non-standard feature, and the\nAPIs exposed by this module for it are non-frozen. This module will be\nupdated, possibly breaking backwards-compatibility, once logging is\nofficially defined by the\nW3C WebDriver spec.

"},{"title":"lib/promise.js","link":"lib/promise.js","description":"

Defines a handful of utility functions to simplify working\nwith promises.

"},{"title":"lib/proxy.js","link":"lib/proxy.js","description":"

Defines functions for configuring a webdriver proxy:

\n
const proxy = require('selenium-webdriver/proxy');\nconst {Capabilities} = require('selenium-webdriver');\n\nlet capabilities = new Capabilities();\ncapabilities.setProxy(proxy.manual({http: 'host:1234'});\n
"},{"title":"lib/symbols.js","link":"lib/symbols.js","description":"

Defines well-known symbols used within the selenium-webdriver\nlibrary.

"},{"title":"lib/until.js","link":"lib/until.js","description":"

Defines common conditions for use with\n{@link webdriver.WebDriver#wait WebDriver wait}.

\n

Sample usage:

\n
driver.get('http://www.google.com/ncr');\n\nvar query = driver.wait(until.elementLocated(By.name('q')));\nquery.sendKeys('webdriver\\n');\n\ndriver.wait(until.titleIs('webdriver - Google Search'));\n
\n

To define a custom condition, simply call WebDriver.wait with a function\nthat will eventually return a truthy-value (neither null, undefined, false,\n0, or the empty string):

\n
driver.wait(function() {\n  return driver.getTitle().then(function(title) {\n    return title === 'webdriver - Google Search';\n  });\n}, 1000);\n
"},{"title":"lib/webdriver.js","link":"lib/webdriver.js","description":"

The heart of the WebDriver JavaScript API.

"},{"title":"lib/webelement.js","link":"lib/webelement.js","description":"

Defines some common methods used for WebElements.

"},{"title":"load","link":"load","description":"

Asynchronously opens a zip archive.

"},{"title":"locate","link":"locate","description":"

Locates a test resource.

"},{"title":"locateWith","link":"locateWith","description":"

Start searching for relative objects using search criteria with By.

"},{"title":"manual","link":"manual","description":"

Manually configures the browser proxy. The following options are\nsupported:

\n
    \n
  • ftp: Proxy host to use for FTP requests
  • \n
  • http: Proxy host to use for HTTP requests
  • \n
  • https: Proxy host to use for HTTPS requests
  • \n
  • bypass: A list of hosts requests should directly connect to,\nbypassing any other proxies for that request. May be specified as a\ncomma separated string, or a list of strings.
  • \n
\n

Behavior is undefined for FTP, HTTP, and HTTPS requests if the\ncorresponding key is omitted from the configuration options.

"},{"title":"map","link":"map","description":"

Calls a function for each element in an array and inserts the result into a\nnew array, which is used as the fulfillment value of the promise returned\nby this function.

\n

If the return value of the mapping function is a promise, this function\nwill wait for it to be fulfilled before inserting it into the new array.

\n

If the mapping function throws or returns a rejected promise, the\npromise returned by this function will be rejected with the same reason.\nOnly the first failure will be reported; all subsequent errors will be\nsilently ignored.

"},{"title":"mkdir","link":"mkdir","description":"

Creates a directory.

"},{"title":"mkdirp","link":"mkdirp","description":"

Recursively creates a directory and any ancestors that do not yet exist.

"},{"title":"module.exports","link":"exports","description":"

API

"},{"title":"module.exports","link":"exports","description":"

API

"},{"title":"module.exports.serialize","link":"serialize","description":"

The serialize symbol specifies a method that returns an object's serialized\nrepresentation. If an object's serialized form is not immediately\navailable, the serialize method will return a promise that will be resolved\nwith the serialized form.

\n

Note that the described method is analogous to objects that define a\ntoJSON() method, except the serialized result may be a promise, or\nanother object with a promised property.

"},{"title":"module:selenium-webdriver/chrome","link":"selenium-webdriver/chrome","description":"

Defines a {@linkplain Driver WebDriver} client for the Chrome\nweb browser. Before using this module, you must download the latest\nChromeDriver release and ensure it can be found on your system PATH.

\n

There are three primary classes exported by this module:

\n
    \n
  1. \n

    {@linkplain ServiceBuilder}: configures the\n{@link selenium-webdriver/remote.DriverService remote.DriverService}\nthat manages the ChromeDriver child process.

    \n
  2. \n
  3. \n

    {@linkplain Options}: defines configuration options for each new Chrome\nsession, such as which {@linkplain Options#setProxy proxy} to use,\nwhat {@linkplain Options#addExtensions extensions} to install, or\nwhat {@linkplain Options#addArguments command-line switches} to use when\nstarting the browser.

    \n
  4. \n
  5. \n

    {@linkplain Driver}: the WebDriver client; each new instance will control\na unique browser session with a clean user profile (unless otherwise\nconfigured through the {@link Options} class).

    \n

    let chrome = require('selenium-webdriver/chrome');\nlet {Builder} = require('selenium-webdriver');

    \n

    let driver = new Builder()\n.forBrowser('chrome')\n.setChromeOptions(new chrome.Options())\n.build();

    \n
  6. \n
\n

Customizing the ChromeDriver Server

\n

By default, every Chrome session will use a single driver service, which is\nstarted the first time a {@link Driver} instance is created and terminated\nwhen this process exits. The default service will inherit its environment\nfrom the current process and direct all output to /dev/null. You may obtain\na handle to this default service using\n{@link #getDefaultService getDefaultService()} and change its configuration\nwith {@link #setDefaultService setDefaultService()}.

\n

You may also create a {@link Driver} with its own driver service. This is\nuseful if you need to capture the server's log output for a specific session:

\n
let chrome = require('selenium-webdriver/chrome');\n\nlet service = new chrome.ServiceBuilder()\n    .loggingTo('/my/log/file.txt')\n    .enableVerboseLogging()\n    .build();\n\nlet options = new chrome.Options();\n// configure browser options ...\n\nlet driver = chrome.Driver.createSession(options, service);\n
\n

Users should only instantiate the {@link Driver} class directly when they\nneed a custom driver service configuration (as shown above). For normal\noperation, users should start Chrome using the\n{@link selenium-webdriver.Builder}.

\n

Working with Android

\n

The ChromeDriver supports running tests on the Chrome browser as\nwell as WebView apps starting in Android 4.4 (KitKat). In order to\nwork with Android, you must first start the adb

\n
adb start-server\n
\n

By default, adb will start on port 5037. You may change this port, but this\nwill require configuring a custom server that will connect\nto adb on the {@linkplain ServiceBuilder#setAdbPort correct port}:

\n
let service = new chrome.ServiceBuilder()\n    .setAdbPort(1234)\n    build();\n// etc.\n
\n

The ChromeDriver may be configured to launch Chrome on Android using\n{@link Options#androidChrome()}:

\n
let driver = new Builder()\n    .forBrowser('chrome')\n    .setChromeOptions(new chrome.Options().androidChrome())\n    .build();\n
\n

Alternatively, you can configure the ChromeDriver to launch an app with a\nChrome-WebView by setting the {@linkplain Options#androidActivity\nandroidActivity} option:

\n
let driver = new Builder()\n    .forBrowser('chrome')\n    .setChromeOptions(new chrome.Options()\n        .androidPackage('com.example')\n        .androidActivity('com.example.Activity'))\n    .build();\n
\n

[Refer to the ChromeDriver site] for more information on using the\nChromeDriver with Android.

"},{"title":"module:selenium-webdriver/chrome~Driver","link":"Driver"},{"title":"module:selenium-webdriver/chrome~Driver.createSession","link":"createSession","description":"

Creates a new session with the ChromeDriver.

"},{"title":"module:selenium-webdriver/chrome~Driver.getDefaultService","link":"getDefaultService","description":"

returns new instance chrome driver service

"},{"title":"module:selenium-webdriver/chrome~Options","link":"Options"},{"title":"module:selenium-webdriver/chrome~Options#androidChrome","link":"androidChrome","description":"

Configures the ChromeDriver to launch Chrome on Android via adb. This\nfunction is shorthand for\n{@link #androidPackage options.androidPackage('com.android.chrome')}.

"},{"title":"module:selenium-webdriver/chrome~Options#setChromeBinaryPath","link":"setChromeBinaryPath","description":"

Sets the path to the Chrome binary to use. On Mac OS X, this path should\nreference the actual Chrome executable, not just the application binary\n(e.g. "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome").

\n

The binary path be absolute or relative to the chromedriver server\nexecutable, but it must exist on the machine that will launch Chrome.

"},{"title":"module:selenium-webdriver/chrome~Options#setChromeLogFile","link":"setChromeLogFile","description":"

Sets the path to Chrome's log file. This path should exist on the machine\nthat will launch Chrome.

"},{"title":"module:selenium-webdriver/chrome~Options#setChromeMinidumpPath","link":"setChromeMinidumpPath","description":"

Sets the directory to store Chrome minidumps in. This option is only\nsupported when ChromeDriver is running on Linux.

"},{"title":"module:selenium-webdriver/chrome~ServiceBuilder","link":"ServiceBuilder"},{"title":"module:selenium-webdriver/chromium","link":"selenium-webdriver/chromium","description":"

Defines an abstract {@linkplain Driver WebDriver} client for\nChromium-based web browsers. These classes should not be instantiated\ndirectly.

\n

There are three primary classes exported by this module:

\n
    \n
  1. \n

    {@linkplain ServiceBuilder}: configures the\n{@link selenium-webdriver/remote.DriverService remote.DriverService}\nthat manages a WebDriver server child process.

    \n
  2. \n
  3. \n

    {@linkplain Options}: defines configuration options for each new Chromium\nsession, such as which {@linkplain Options#setProxy proxy} to use,\nwhat {@linkplain Options#addExtensions extensions} to install, or\nwhat {@linkplain Options#addArguments command-line switches} to use when\nstarting the browser.

    \n
  4. \n
  5. \n

    {@linkplain Driver}: the WebDriver client; each new instance will control\na unique browser session with a clean user profile (unless otherwise\nconfigured through the {@link Options} class).

    \n

    let chrome = require('selenium-webdriver/chrome');\nlet {Builder} = require('selenium-webdriver');

    \n

    let driver = new Builder()\n.forBrowser('chrome')\n.setChromeOptions(new chrome.Options())\n.build();

    \n
  6. \n
\n

Customizing the Chromium WebDriver Server

\n

Subclasses of {@link Driver} are expected to provide a static\ngetDefaultService method. By default, this method will be called every time\na {@link Driver} instance is created to obtain the default driver service\nfor that specific browser (e.g. Chrome or Chromium Edge). Subclasses are\nresponsible for managing the lifetime of the default service.

\n

You may also create a {@link Driver} with its own driver service. This is\nuseful if you need to capture the server's log output for a specific session:

\n
let chrome = require('selenium-webdriver/chrome');\n\nlet service = new chrome.ServiceBuilder()\n    .loggingTo('/my/log/file.txt')\n    .enableVerboseLogging()\n    .build();\n\nlet options = new chrome.Options();\n// configure browser options ...\n\nlet driver = chrome.Driver.createSession(options, service);\n
"},{"title":"module:selenium-webdriver/chromium~Command","link":"Command","description":"

Custom command names supported by Chromium WebDriver.

"},{"title":"module:selenium-webdriver/chromium~Command.DELETE_NETWORK_CONDITIONS","link":"DELETE_NETWORK_CONDITIONS"},{"title":"module:selenium-webdriver/chromium~Command.GET_CAST_ISSUE_MESSAGE","link":"GET_CAST_ISSUE_MESSAGE"},{"title":"module:selenium-webdriver/chromium~Command.GET_CAST_SINKS","link":"GET_CAST_SINKS"},{"title":"module:selenium-webdriver/chromium~Command.GET_NETWORK_CONDITIONS","link":"GET_NETWORK_CONDITIONS"},{"title":"module:selenium-webdriver/chromium~Command.LAUNCH_APP","link":"LAUNCH_APP"},{"title":"module:selenium-webdriver/chromium~Command.SEND_AND_GET_DEVTOOLS_COMMAND","link":"SEND_AND_GET_DEVTOOLS_COMMAND"},{"title":"module:selenium-webdriver/chromium~Command.SEND_DEVTOOLS_COMMAND","link":"SEND_DEVTOOLS_COMMAND"},{"title":"module:selenium-webdriver/chromium~Command.SET_CAST_SINK_TO_USE","link":"SET_CAST_SINK_TO_USE"},{"title":"module:selenium-webdriver/chromium~Command.SET_NETWORK_CONDITIONS","link":"SET_NETWORK_CONDITIONS"},{"title":"module:selenium-webdriver/chromium~Command.SET_PERMISSION","link":"SET_PERMISSION"},{"title":"module:selenium-webdriver/chromium~Command.START_CAST_DESKTOP_MIRRORING","link":"START_CAST_DESKTOP_MIRRORING"},{"title":"module:selenium-webdriver/chromium~Command.START_CAST_TAB_MIRRORING","link":"START_CAST_TAB_MIRRORING"},{"title":"module:selenium-webdriver/chromium~Command.STOP_CASTING","link":"STOP_CASTING"},{"title":"module:selenium-webdriver/chromium~Driver","link":"Driver"},{"title":"module:selenium-webdriver/chromium~Driver#deleteNetworkConditions","link":"deleteNetworkConditions","description":"

Schedules a command to delete Chromium network emulation settings.

"},{"title":"module:selenium-webdriver/chromium~Driver#getCastIssueMessage","link":"getCastIssueMessage","description":"

Returns an error message when there is any issue in a Cast session.

"},{"title":"module:selenium-webdriver/chromium~Driver#getCastSinks","link":"getCastSinks","description":"

Returns the list of cast sinks (Cast devices) available to the Chrome media router.

"},{"title":"module:selenium-webdriver/chromium~Driver#getNetworkConditions","link":"getNetworkConditions","description":"

Schedules a command to get Chromium network emulation settings.

"},{"title":"module:selenium-webdriver/chromium~Driver#launchApp","link":"launchApp","description":"

Schedules a command to launch Chrome App with given ID.

"},{"title":"module:selenium-webdriver/chromium~Driver#sendAndGetDevToolsCommand","link":"sendAndGetDevToolsCommand","description":"

Sends an arbitrary devtools command to the browser and get the result.

"},{"title":"module:selenium-webdriver/chromium~Driver#sendDevToolsCommand","link":"sendDevToolsCommand","description":"

Sends an arbitrary devtools command to the browser.

"},{"title":"module:selenium-webdriver/chromium~Driver#setCastSinkToUse","link":"setCastSinkToUse","description":"

Selects a cast sink (Cast device) as the recipient of media router intents (connect or play).

"},{"title":"module:selenium-webdriver/chromium~Driver#setDownloadPath","link":"setDownloadPath","description":"

Sends a DevTools command to change the browser's download directory.

"},{"title":"module:selenium-webdriver/chromium~Driver#setFileDetector","link":"setFileDetector","description":"

This function is a no-op as file detectors are not supported by this\nimplementation.

"},{"title":"module:selenium-webdriver/chromium~Driver#setNetworkConditions","link":"setNetworkConditions","description":"

Schedules a command to set Chromium network emulation settings.

\n

Sample Usage:

\n

driver.setNetworkConditions({\noffline: false,\nlatency: 5, // Additional latency (ms).\ndownload_throughput: 500 * 1024, // Maximal aggregated download throughput.\nupload_throughput: 500 * 1024 // Maximal aggregated upload throughput.\n});

"},{"title":"module:selenium-webdriver/chromium~Driver#setPermission","link":"setPermission","description":"

Set a permission state to the given value.

"},{"title":"module:selenium-webdriver/chromium~Driver#startCastTabMirroring","link":"startCastTabMirroring","description":"

Initiates tab mirroring for the current browser tab on the specified device.

"},{"title":"module:selenium-webdriver/chromium~Driver#startDesktopMirroring","link":"startDesktopMirroring","description":"

Initiates desktop mirroring for the current browser tab on the specified device.

"},{"title":"module:selenium-webdriver/chromium~Driver#stopCasting","link":"stopCasting","description":"

Stops casting from media router to the specified device, if connected.

"},{"title":"module:selenium-webdriver/chromium~Driver.createSession","link":"createSession","description":"

Creates a new session with the WebDriver server.

"},{"title":"module:selenium-webdriver/chromium~Extensions","link":"Extensions"},{"title":"module:selenium-webdriver/chromium~Extensions#Symbols.serialize","link":"Symbols.serialize"},{"title":"module:selenium-webdriver/chromium~Extensions#add","link":"add","description":"

Add additional extensions to install when launching the browser. Each\nextension should be specified as the path to the packed CRX file, or a\nBuffer for an extension.

"},{"title":"module:selenium-webdriver/chromium~Extensions#length","link":"length"},{"title":"module:selenium-webdriver/chromium~Options","link":"Options"},{"title":"module:selenium-webdriver/chromium~Options#addArguments","link":"addArguments","description":"

Add additional command line arguments to use when launching the browser.\nEach argument may be specified with or without the "--" prefix\n(e.g. "--foo" and "foo"). Arguments with an associated value should be\ndelimited by an "=": "foo=bar".

"},{"title":"module:selenium-webdriver/chromium~Options#addExtensions","link":"addExtensions","description":"

Add additional extensions to install when launching the browser. Each extension\nshould be specified as the path to the packed CRX file, or a Buffer for an\nextension.

"},{"title":"module:selenium-webdriver/chromium~Options#androidActivity","link":"androidActivity","description":"

Sets the name of the activity hosting a Chrome-based Android WebView. This\noption must be set to connect to an Android WebView

"},{"title":"module:selenium-webdriver/chromium~Options#androidDeviceSerial","link":"androidDeviceSerial","description":"

Sets the device serial number to connect to via ADB. If not specified, the\nWebDriver server will select an unused device at random. An error will be\nreturned if all devices already have active sessions.

"},{"title":"module:selenium-webdriver/chromium~Options#androidPackage","link":"androidPackage","description":"

Sets the package name of the Chrome or WebView app.

"},{"title":"module:selenium-webdriver/chromium~Options#androidProcess","link":"androidProcess","description":"

Sets the process name of the Activity hosting the WebView (as given by\nps). If not specified, the process name is assumed to be the same as\n{@link #androidPackage}.

"},{"title":"module:selenium-webdriver/chromium~Options#androidUseRunningApp","link":"androidUseRunningApp","description":"

Sets whether to connect to an already-running instead of the specified\n{@linkplain #androidProcess app} instead of launching the app with a clean\ndata directory.

"},{"title":"module:selenium-webdriver/chromium~Options#debuggerAddress","link":"debuggerAddress","description":"

Sets the address of a Chromium remote debugging server to connect to.\nAddress should be of the form "{hostname|IP address}:port"\n(e.g. "localhost:9222").

"},{"title":"module:selenium-webdriver/chromium~Options#detachDriver","link":"detachDriver","description":"

Sets whether to leave the started browser process running if the controlling\ndriver service is killed before {@link webdriver.WebDriver#quit()} is\ncalled.

"},{"title":"module:selenium-webdriver/chromium~Options#enableBidi","link":"enableBidi","description":"

Enable bidi connection

"},{"title":"module:selenium-webdriver/chromium~Options#excludeSwitches","link":"excludeSwitches","description":"

List of Chrome command line switches to exclude that ChromeDriver by default\npasses when starting Chrome. Do not prefix switches with "--".

"},{"title":"module:selenium-webdriver/chromium~Options#setBinaryPath","link":"setBinaryPath","description":"

Sets the path to the browser binary to use. On Mac OS X, this path should\nreference the actual Chromium executable, not just the application binary\n(e.g. "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome").

\n

The binary path can be absolute or relative to the WebDriver server\nexecutable, but it must exist on the machine that will launch the browser.

"},{"title":"module:selenium-webdriver/chromium~Options#setBrowserLogFile","link":"setBrowserLogFile","description":"

Sets the path to the browser's log file. This path should exist on the machine\nthat will launch the browser.

"},{"title":"module:selenium-webdriver/chromium~Options#setBrowserMinidumpPath","link":"setBrowserMinidumpPath","description":"

Sets the directory to store browser minidumps in. This option is only\nsupported when the driver is running on Linux.

"},{"title":"module:selenium-webdriver/chromium~Options#setLocalState","link":"setLocalState","description":"

Sets preferences for the "Local State" file in Chrome's user data\ndirectory.

"},{"title":"module:selenium-webdriver/chromium~Options#setMobileEmulation","link":"setMobileEmulation","description":"

Configures the browser to emulate a mobile device. For more information, refer\nto the ChromeDriver project page on mobile emulation. Configuration\noptions include:

\n
    \n
  • deviceName: The name of a pre-configured emulated device
  • \n
  • width: screen width, in pixels
  • \n
  • height: screen height, in pixels
  • \n
  • pixelRatio: screen pixel ratio
  • \n
\n

Example 1: Using a Pre-configured Device

\n
let options = new chrome.Options().setMobileEmulation(\n    {deviceName: 'Google Nexus 5'});\n\nlet driver = chrome.Driver.createSession(options);\n
\n

Example 2: Using Custom Screen Configuration

\n
let options = new chrome.Options().setMobileEmulation({deviceMetrics: {\n    width: 360,\n    height: 640,\n    pixelRatio: 3.0\n}});\n\nlet driver = chrome.Driver.createSession(options);\n
"},{"title":"module:selenium-webdriver/chromium~Options#setPerfLoggingPrefs","link":"setPerfLoggingPrefs","description":"

Sets the performance logging preferences. Options include:

\n
    \n
  • enableNetwork: Whether or not to collect events from Network domain.
  • \n
  • enablePage: Whether or not to collect events from Page domain.
  • \n
  • enableTimeline: Whether or not to collect events from Timeline domain.\nNote: when tracing is enabled, Timeline domain is implicitly disabled,\nunless enableTimeline is explicitly set to true.
  • \n
  • traceCategories: A comma-separated string of Chromium tracing\ncategories for which trace events should be collected. An unspecified\nor empty string disables tracing.
  • \n
  • bufferUsageReportingInterval: The requested number of milliseconds\nbetween DevTools trace buffer usage events. For example, if 1000, then\nonce per second, DevTools will report how full the trace buffer is. If\na report indicates the buffer usage is 100%, a warning will be issued.
  • \n
"},{"title":"module:selenium-webdriver/chromium~Options#setUserPreferences","link":"setUserPreferences","description":"

Sets the user preferences for Chrome's user profile. See the "Preferences"\nfile in Chrome's user data directory for examples.

"},{"title":"module:selenium-webdriver/chromium~Options#windowSize","link":"windowSize","description":"

Sets the initial window size.

"},{"title":"module:selenium-webdriver/chromium~Options#windowTypes","link":"windowTypes","description":"

Sets a list of the window types that will appear when getting window\nhandles. For access to elements, include "webview" in the list.

"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder","link":"ServiceBuilder"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder#enableChromeLogging","link":"enableChromeLogging","description":"

Enables Chrome logging.

"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder#enableVerboseLogging","link":"enableVerboseLogging","description":"

Enables verbose logging.

"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder#loggingTo","link":"loggingTo","description":"

Sets the path of the log file the driver should log to. If a log file is\nnot specified, the driver will log to stderr.

"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder#setAdbPort","link":"setAdbPort","description":"

Sets which port adb is listening to. The driver will connect to adb\nif an {@linkplain Options#androidPackage Android session} is requested, but\nadb must be started beforehand.

"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder#setNumHttpThreads","link":"setNumHttpThreads","description":"

Sets the number of threads the driver should use to manage HTTP requests.\nBy default, the driver will use 4 threads.

"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder#setPath","link":"setPath"},{"title":"module:selenium-webdriver/chromium~configureExecutor","link":"configureExecutor","description":"

Configures the given executor with Chromium-specific commands.

"},{"title":"module:selenium-webdriver/chromium~createExecutor","link":"createExecutor","description":"

Creates a command executor with support for Chromium's custom commands.

"},{"title":"module:selenium-webdriver/edge","link":"selenium-webdriver/edge","description":"

Defines a {@linkplain Driver WebDriver} client for\nMicrosoft's Edge web browser. Edge (Chromium) is supported and support\nfor Edge Legacy (EdgeHTML) as part of https://github.com/SeleniumHQ/selenium/issues/9166.\nBefore using this module, you must download and install the correct\nWebDriver server.

\n

Ensure that the msedgedriver (Chromium)\nis on your PATH.

\n

You may use {@link Options} to specify whether Edge Chromium options should be used:\nconst edge = require('selenium-webdriver/edge');\nconst options = new edge.Options();\nThere are three primary classes exported by this module:

\n
    \n
  1. \n

    {@linkplain ServiceBuilder}: configures the\n{@link ./remote.DriverService remote.DriverService}\nthat manages the [WebDriver] child process.

    \n
  2. \n
  3. \n

    {@linkplain Options}: defines configuration options for each new\nWebDriver session, such as which\n{@linkplain Options#setProxy proxy} to use when starting the browser.

    \n
  4. \n
  5. \n

    {@linkplain Driver}: the WebDriver client; each new instance will control\na unique browser session.

    \n
  6. \n
\n

Customizing the WebDriver Server

\n

By default, every MicrosoftEdge session will use a single driver service,\nwhich is started the first time a {@link Driver} instance is created and\nterminated when this process exits. The default service will inherit its\nenvironment from the current process.\nYou may obtain a handle to this default service using\n{@link #getDefaultService getDefaultService()} and change its configuration\nwith {@link #setDefaultService setDefaultService()}.

\n

You may also create a {@link Driver} with its own driver service. This is\nuseful if you need to capture the server's log output for a specific session:

\n
const edge = require('selenium-webdriver/edge');\n\nconst service = new edge.ServiceBuilder()\n    .setPort(55555)\n    .build();\n\nlet options = new edge.Options();\n// configure browser options ...\n\nlet driver = edge.Driver.createSession(options, service);\n
\n

Users should only instantiate the {@link Driver} class directly when they\nneed a custom driver service configuration (as shown above). For normal\noperation, users should start msedgedriver using the\n{@link ./builder.Builder selenium-webdriver.Builder}.

"},{"title":"module:selenium-webdriver/edge~Driver","link":"Driver"},{"title":"module:selenium-webdriver/edge~Driver#setFileDetector","link":"setFileDetector","description":"

This function is a no-op as file detectors are not supported by this\nimplementation.

"},{"title":"module:selenium-webdriver/edge~Driver.createSession","link":"createSession","description":"

Creates a new browser session for Microsoft's Edge browser.

"},{"title":"module:selenium-webdriver/edge~Driver.getDefaultService","link":"getDefaultService","description":"

returns new instance of edge driver service

"},{"title":"module:selenium-webdriver/edge~Options","link":"Options"},{"title":"module:selenium-webdriver/edge~Options#setEdgeChromiumBinaryPath","link":"setEdgeChromiumBinaryPath","description":"

Sets the path to the edge binary to use

\n

The binary path be absolute or relative to the msedgedriver server\nexecutable, but it must exist on the machine that will launch edge chromium.

"},{"title":"module:selenium-webdriver/edge~Options#useWebView","link":"useWebView","description":"

Changes the browser name to 'webview2' to enable\n\ntest automation of WebView2 apps with Microsoft Edge WebDriver\n

"},{"title":"module:selenium-webdriver/edge~ServiceBuilder","link":"ServiceBuilder"},{"title":"module:selenium-webdriver/firefox","link":"selenium-webdriver/firefox","description":"

Defines the {@linkplain Driver WebDriver} client for Firefox.\nBefore using this module, you must download the latest\ngeckodriver release and ensure it can be found on your system PATH.

\n

Each FirefoxDriver instance will be created with an anonymous profile,\nensuring browser historys do not share session data (cookies, history, cache,\noffline storage, etc.)

\n

Customizing the Firefox Profile

\n

The profile used for each WebDriver session may be configured using the\n{@linkplain Options} class. For example, you may install an extension, like\nFirebug:

\n
const {Builder} = require('selenium-webdriver');\nconst firefox = require('selenium-webdriver/firefox');\n\nlet options = new firefox.Options()\n    .addExtensions('/path/to/firebug.xpi')\n    .setPreference('extensions.firebug.showChromeErrors', true);\n\nlet driver = new Builder()\n    .forBrowser('firefox')\n    .setFirefoxOptions(options)\n    .build();\n
\n

The {@linkplain Options} class may also be used to configure WebDriver based\non a pre-existing browser profile:

\n
let profile = '/usr/local/home/bob/.mozilla/firefox/3fgog75h.testing';\nlet options = new firefox.Options().setProfile(profile);\n
\n

The FirefoxDriver will never modify a pre-existing profile; instead it will\ncreate a copy for it to modify. By extension, there are certain browser\npreferences that are required for WebDriver to function properly and they\nwill always be overwritten.

\n

Using a Custom Firefox Binary

\n

On Windows and MacOS, the FirefoxDriver will search for Firefox in its\ndefault installation location:

\n
    \n
  • Windows: C:\\Program Files and C:\\Program Files (x86).
  • \n
  • MacOS: /Applications/Firefox.app
  • \n
\n

For Linux, Firefox will always be located on the PATH: $(where firefox).

\n

You can provide a custom location for Firefox by setting the binary in the\n{@link Options}:setBinary method.

\n
const {Builder} = require('selenium-webdriver');\nconst firefox = require('selenium-webdriver/firefox');\n
\n

let options = new firefox.Options()\n.setBinary('/my/firefox/install/dir/firefox');\nlet driver = new Builder()\n.forBrowser('firefox')\n.setFirefoxOptions(options)\n.build();

\n

Remote Testing

\n

You may customize the Firefox binary and profile when running against a\nremote Selenium server. Your custom profile will be packaged as a zip and\ntransferred to the remote host for use. The profile will be transferred\nonce for each new session. The performance impact should be minimal if\nyou've only configured a few extra browser preferences. If you have a large\nprofile with several extensions, you should consider installing it on the\nremote host and defining its path via the {@link Options} class. Custom\nbinaries are never copied to remote machines and must be referenced by\ninstallation path.

\n
const {Builder} = require('selenium-webdriver');\nconst firefox = require('selenium-webdriver/firefox');\n\nlet options = new firefox.Options()\n    .setProfile('/profile/path/on/remote/host')\n    .setBinary('/install/dir/on/remote/host/firefox');\n\nlet driver = new Builder()\n    .forBrowser('firefox')\n    .usingServer('http://127.0.0.1:4444/wd/hub')\n    .setFirefoxOptions(options)\n    .build();\n
"},{"title":"module:selenium-webdriver/firefox~AddonFormatError","link":"AddonFormatError"},{"title":"module:selenium-webdriver/firefox~AddonFormatError#name","link":"name"},{"title":"module:selenium-webdriver/firefox~Channel","link":"Channel"},{"title":"module:selenium-webdriver/firefox~Channel#Symbols.serialize","link":"Symbols.serialize"},{"title":"module:selenium-webdriver/firefox~Channel#locate","link":"locate","description":"

Attempts to locate the Firefox executable for this release channel. This\nwill first check the default installation location for the channel before\nchecking the user's PATH. The returned promise will be rejected if Firefox\ncan not be found.

"},{"title":"module:selenium-webdriver/firefox~Channel.BETA","link":"BETA","description":"

Firefox's beta channel. Note this is provided mainly for convenience as\nthe beta channel has the same installation location as the main release\nchannel.

"},{"title":"module:selenium-webdriver/firefox~Channel.DEV","link":"DEV","description":"

Firefox's developer channel.

"},{"title":"module:selenium-webdriver/firefox~Channel.NIGHTLY","link":"NIGHTLY","description":"

Firefox's nightly release channel.

"},{"title":"module:selenium-webdriver/firefox~Channel.RELEASE","link":"RELEASE","description":"

Firefox's release channel.

"},{"title":"module:selenium-webdriver/firefox~Context","link":"Context","description":"

Enum of available command contexts.

\n

Command contexts are specific to Marionette, and may be used with the\n{@link #context=} method. Contexts allow you to direct all subsequent\ncommands to either "content" (default) or "chrome". The latter gives\nyou elevated security permissions.

"},{"title":"module:selenium-webdriver/firefox~Context.CHROME","link":"CHROME"},{"title":"module:selenium-webdriver/firefox~Context.CONTENT","link":"CONTENT"},{"title":"module:selenium-webdriver/firefox~Driver","link":"Driver"},{"title":"module:selenium-webdriver/firefox~Driver#getContext","link":"getContext","description":"

Get the context that is currently in effect.

"},{"title":"module:selenium-webdriver/firefox~Driver#installAddon","link":"installAddon","description":"

Installs a new addon with the current session. This function will return an\nID that may later be used to {@linkplain #uninstallAddon uninstall} the\naddon.

"},{"title":"module:selenium-webdriver/firefox~Driver#setContext","link":"setContext","description":"

Changes target context for commands between chrome- and content.

\n

Changing the current context has a stateful impact on all subsequent\ncommands. The {@link Context.CONTENT} context has normal web\nplatform document permissions, as if you would evaluate arbitrary\nJavaScript. The {@link Context.CHROME} context gets elevated\npermissions that lets you manipulate the browser chrome itself,\nwith full access to the XUL toolkit.

\n

Use your powers wisely.

"},{"title":"module:selenium-webdriver/firefox~Driver#setFileDetector","link":"setFileDetector","description":"

This function is a no-op as file detectors are not supported by this\nimplementation.

"},{"title":"module:selenium-webdriver/firefox~Driver#takeFullPageScreenshot","link":"takeFullPageScreenshot","description":"

Take full page screenshot of the visible region

"},{"title":"module:selenium-webdriver/firefox~Driver#uninstallAddon","link":"uninstallAddon","description":"

Uninstalls an addon from the current browser session's profile.

"},{"title":"module:selenium-webdriver/firefox~Driver.createSession","link":"createSession","description":"

Creates a new Firefox session.

"},{"title":"module:selenium-webdriver/firefox~ExtensionCommand","link":"ExtensionCommand"},{"title":"module:selenium-webdriver/firefox~ExtensionCommand.FULL_PAGE_SCREENSHOT","link":"FULL_PAGE_SCREENSHOT"},{"title":"module:selenium-webdriver/firefox~ExtensionCommand.GET_CONTEXT","link":"GET_CONTEXT"},{"title":"module:selenium-webdriver/firefox~ExtensionCommand.INSTALL_ADDON","link":"INSTALL_ADDON"},{"title":"module:selenium-webdriver/firefox~ExtensionCommand.SET_CONTEXT","link":"SET_CONTEXT"},{"title":"module:selenium-webdriver/firefox~ExtensionCommand.UNINSTALL_ADDON","link":"UNINSTALL_ADDON"},{"title":"module:selenium-webdriver/firefox~Options","link":"Options"},{"title":"module:selenium-webdriver/firefox~Options#addArguments","link":"addArguments","description":"

Specify additional command line arguments that should be used when starting\nthe Firefox browser.

"},{"title":"module:selenium-webdriver/firefox~Options#addExtensions","link":"addExtensions","description":"

Add extensions that should be installed when starting Firefox.

"},{"title":"module:selenium-webdriver/firefox~Options#enableBidi","link":"enableBidi","description":"

Enable bidi connection

"},{"title":"module:selenium-webdriver/firefox~Options#enableDebugger","link":"enableDebugger","description":"

Enables moz:debuggerAddress for firefox cdp

"},{"title":"module:selenium-webdriver/firefox~Options#enableMobile","link":"enableMobile","description":"

Enables Mobile start up features

"},{"title":"module:selenium-webdriver/firefox~Options#setBinary","link":"setBinary","description":"

Sets the binary to use. The binary may be specified as the path to a\nFirefox executable.

"},{"title":"module:selenium-webdriver/firefox~Options#setPreference","link":"setPreference"},{"title":"module:selenium-webdriver/firefox~Options#setProfile","link":"setProfile","description":"

Sets the path to an existing profile to use as a template for new browser\nsessions. This profile will be copied for each new session - changes will\nnot be applied to the profile itself.

"},{"title":"module:selenium-webdriver/firefox~Options#windowSize","link":"windowSize","description":"

Sets the initial window size

"},{"title":"module:selenium-webdriver/firefox~Profile#Symbols.serialize","link":"Symbols.serialize"},{"title":"module:selenium-webdriver/firefox~ServiceBuilder","link":"ServiceBuilder"},{"title":"module:selenium-webdriver/firefox~ServiceBuilder#enableVerboseLogging","link":"enableVerboseLogging","description":"

Enables verbose logging.

"},{"title":"module:selenium-webdriver/firefox~buildProfile","link":"buildProfile"},{"title":"module:selenium-webdriver/firefox~configureExecutor","link":"configureExecutor","description":"

Configures the given executor with Firefox-specific commands.

"},{"title":"module:selenium-webdriver/firefox~createExecutor","link":"createExecutor","description":"

Creates a command executor with support for Marionette's custom commands.

"},{"title":"module:selenium-webdriver/firefox~findInProgramFiles","link":"findInProgramFiles"},{"title":"module:selenium-webdriver/firefox~installExtension","link":"installExtension","description":"

Installs an extension to the given directory.

"},{"title":"module:selenium-webdriver/ie","link":"selenium-webdriver/ie","description":"

Defines a {@linkplain Driver WebDriver} client for Microsoft's\nInternet Explorer. Before using the IEDriver, you must download the latest\nIEDriverServer\nand place it on your\nPATH. You must also apply\nthe system configuration outlined on the Selenium project\nwiki

"},{"title":"module:selenium-webdriver/ie~Driver","link":"Driver"},{"title":"module:selenium-webdriver/ie~Driver#setFileDetector","link":"setFileDetector","description":"

This function is a no-op as file detectors are not supported by this\nimplementation.

"},{"title":"module:selenium-webdriver/ie~Driver.createSession","link":"createSession","description":"

Creates a new session for Microsoft's Internet Explorer.

"},{"title":"module:selenium-webdriver/ie~Key","link":"Key","description":"

Option keys:\nhttps://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities#ie-specific

"},{"title":"module:selenium-webdriver/ie~Key.ATTACH_TO_EDGE_CHROMIUM","link":"ATTACH_TO_EDGE_CHROMIUM"},{"title":"module:selenium-webdriver/ie~Key.BROWSER_ATTACH_TIMEOUT","link":"BROWSER_ATTACH_TIMEOUT"},{"title":"module:selenium-webdriver/ie~Key.BROWSER_COMMAND_LINE_SWITCHES","link":"BROWSER_COMMAND_LINE_SWITCHES"},{"title":"module:selenium-webdriver/ie~Key.EDGE_EXECUTABLE_PATH","link":"EDGE_EXECUTABLE_PATH"},{"title":"module:selenium-webdriver/ie~Key.ELEMENT_SCROLL_BEHAVIOR","link":"ELEMENT_SCROLL_BEHAVIOR"},{"title":"module:selenium-webdriver/ie~Key.ENABLE_ELEMENT_CACHE_CLEANUP","link":"ENABLE_ELEMENT_CACHE_CLEANUP"},{"title":"module:selenium-webdriver/ie~Key.ENABLE_PERSISTENT_HOVER","link":"ENABLE_PERSISTENT_HOVER"},{"title":"module:selenium-webdriver/ie~Key.ENSURE_CLEAN_SESSION","link":"ENSURE_CLEAN_SESSION"},{"title":"module:selenium-webdriver/ie~Key.EXTRACT_PATH","link":"EXTRACT_PATH"},{"title":"module:selenium-webdriver/ie~Key.FILE_UPLOAD_DIALOG_TIMEOUT","link":"FILE_UPLOAD_DIALOG_TIMEOUT"},{"title":"module:selenium-webdriver/ie~Key.FORCE_CREATE_PROCESS","link":"FORCE_CREATE_PROCESS"},{"title":"module:selenium-webdriver/ie~Key.HOST","link":"HOST"},{"title":"module:selenium-webdriver/ie~Key.IGNORE_PROCESS_MATCH","link":"IGNORE_PROCESS_MATCH"},{"title":"module:selenium-webdriver/ie~Key.IGNORE_PROTECTED_MODE_SETTINGS","link":"IGNORE_PROTECTED_MODE_SETTINGS"},{"title":"module:selenium-webdriver/ie~Key.IGNORE_ZOOM_SETTING","link":"IGNORE_ZOOM_SETTING"},{"title":"module:selenium-webdriver/ie~Key.INITIAL_BROWSER_URL","link":"INITIAL_BROWSER_URL"},{"title":"module:selenium-webdriver/ie~Key.LOG_FILE","link":"LOG_FILE"},{"title":"module:selenium-webdriver/ie~Key.LOG_LEVEL","link":"LOG_LEVEL"},{"title":"module:selenium-webdriver/ie~Key.REQUIRE_WINDOW_FOCUS","link":"REQUIRE_WINDOW_FOCUS"},{"title":"module:selenium-webdriver/ie~Key.SILENT","link":"SILENT"},{"title":"module:selenium-webdriver/ie~Key.USE_PER_PROCESS_PROXY","link":"USE_PER_PROCESS_PROXY"},{"title":"module:selenium-webdriver/ie~Level","link":"Level","description":"

IEDriverServer logging levels.

"},{"title":"module:selenium-webdriver/ie~Level.DEBUG","link":"DEBUG"},{"title":"module:selenium-webdriver/ie~Level.ERROR","link":"ERROR"},{"title":"module:selenium-webdriver/ie~Level.FATAL","link":"FATAL"},{"title":"module:selenium-webdriver/ie~Level.INFO","link":"INFO"},{"title":"module:selenium-webdriver/ie~Level.TRACE","link":"TRACE"},{"title":"module:selenium-webdriver/ie~Level.WARN","link":"WARN"},{"title":"module:selenium-webdriver/ie~Options","link":"Options"},{"title":"module:selenium-webdriver/ie~Options#addArguments","link":"addArguments","description":"

Specifies command-line switches to use when launching Internet Explorer.\nThis is only valid when used with {@link #forceCreateProcessApi}.

"},{"title":"module:selenium-webdriver/ie~Options#addBrowserCommandSwitches","link":"addBrowserCommandSwitches","description":"

Specifies command-line switches to use when launching Internet Explorer.\nThis is only valid when used with {@link #forceCreateProcessApi}.

"},{"title":"module:selenium-webdriver/ie~Options#browserAttachTimeout","link":"browserAttachTimeout","description":"

Configures the timeout, in milliseconds, that the driver will attempt to\nlocated and attach to a newly opened instance of Internet Explorer. The\ndefault is zero, which indicates waiting indefinitely.

"},{"title":"module:selenium-webdriver/ie~Options#enableElementCacheCleanup","link":"enableElementCacheCleanup","description":"

Configures whether the driver should attempt to remove obsolete\n{@linkplain webdriver.WebElement WebElements} from its internal cache on\npage navigation (true by default). Disabling this option will cause the\ndriver to run with a larger memory footprint.

"},{"title":"module:selenium-webdriver/ie~Options#enablePersistentHover","link":"enablePersistentHover","description":"

Configures whether to enable persistent mouse hovering (true by default).\nPersistent hovering is achieved by continuously firing mouse over events at\nthe last location the mouse cursor has been moved to.

"},{"title":"module:selenium-webdriver/ie~Options#ensureCleanSession","link":"ensureCleanSession","description":"

Configures whether to clear the cache, cookies, history, and saved form data\nbefore starting the browser. Using this capability will clear session data\nfor all running instances of Internet Explorer, including those started\nmanually.

"},{"title":"module:selenium-webdriver/ie~Options#fileUploadDialogTimeout","link":"fileUploadDialogTimeout","description":"

The options File Upload Dialog Timeout in milliseconds

"},{"title":"module:selenium-webdriver/ie~Options#forceCreateProcessApi","link":"forceCreateProcessApi","description":"

Configures whether to launch Internet Explorer using the CreateProcess API.\nIf this option is not specified, IE is launched using IELaunchURL, if\navailable. For IE 8 and above, this option requires the TabProcGrowth\nregistry value to be set to 0.

"},{"title":"module:selenium-webdriver/ie~Options#ignoreZoomSetting","link":"ignoreZoomSetting","description":"

Indicates whether to skip the check that the browser's zoom level is set to\n100%.

"},{"title":"module:selenium-webdriver/ie~Options#initialBrowserUrl","link":"initialBrowserUrl","description":"

Sets the initial URL loaded when IE starts. This is intended to be used with\n{@link #introduceFlakinessByIgnoringProtectedModeSettings} to allow the user to initialize IE in\nthe proper Protected Mode zone. Setting this option may cause browser\ninstability or flaky and unresponsive code. Only "best effort" support is\nprovided when using this option.

"},{"title":"module:selenium-webdriver/ie~Options#introduceFlakinessByIgnoringProtectedModeSettings","link":"introduceFlakinessByIgnoringProtectedModeSettings","description":"

Whether to disable the protected mode settings check when the session is\ncreated. Disabling this setting may lead to significant instability as the\nbrowser may become unresponsive/hang. Only "best effort" support is provided\nwhen using this capability.

\n

For more information, refer to the IEDriver's\nrequired system configuration.

"},{"title":"module:selenium-webdriver/ie~Options#requireWindowFocus","link":"requireWindowFocus","description":"

Configures whether to require the IE window to have input focus before\nperforming any user interactions (i.e. mouse or keyboard events). This\noption is disabled by default, but delivers much more accurate interaction\nevents when enabled.

"},{"title":"module:selenium-webdriver/ie~Options#setEdgeChromium","link":"setEdgeChromium","description":"

Sets the IEDriver to drive Chromium-based Edge in Internet Explorer mode.

"},{"title":"module:selenium-webdriver/ie~Options#setEdgePath","link":"setEdgePath","description":"

Sets the path of the EdgeChromium driver.

"},{"title":"module:selenium-webdriver/ie~Options#setExtractPath","link":"setExtractPath","description":"

Sets the path of the temporary data directory to use.

"},{"title":"module:selenium-webdriver/ie~Options#setHost","link":"setHost","description":"

Sets the IP address of the driver's host adapter.

"},{"title":"module:selenium-webdriver/ie~Options#setLogFile","link":"setLogFile","description":"

Sets the path to the log file the driver should log to.

"},{"title":"module:selenium-webdriver/ie~Options#setLogLevel","link":"setLogLevel","description":"

Sets the IEDriverServer's logging {@linkplain Level level}.

"},{"title":"module:selenium-webdriver/ie~Options#setScrollBehavior","link":"setScrollBehavior","description":"

Sets how elements should be scrolled into view for interaction.

"},{"title":"module:selenium-webdriver/ie~Options#silent","link":"silent","description":"

Sets whether the driver should start in silent mode.

"},{"title":"module:selenium-webdriver/ie~Options#usePerProcessProxy","link":"usePerProcessProxy","description":"

Configures whether proxies should be configured on a per-process basis. If\nnot set, setting a {@linkplain #setProxy proxy} will configure the system\nproxy. The default behavior is to use the system proxy.

"},{"title":"module:selenium-webdriver/ie~ServiceBuilder","link":"ServiceBuilder"},{"title":"module:selenium-webdriver/safari","link":"selenium-webdriver/safari","description":"

Defines a WebDriver client for Safari.

"},{"title":"module:selenium-webdriver/safari~Driver","link":"Driver"},{"title":"module:selenium-webdriver/safari~Driver.createSession","link":"createSession","description":"

Creates a new Safari session.

"},{"title":"module:selenium-webdriver/safari~Options","link":"Options"},{"title":"module:selenium-webdriver/safari~Options#enableLogging","link":"enableLogging","description":"

Enables diagnostic logging for Safari.

\n

This method sets the safari:diagnose option to true in the current configuration.\nIt is used to enable additional logging or diagnostic features specific to Safari.

"},{"title":"module:selenium-webdriver/safari~Options#setTechnologyPreview","link":"setTechnologyPreview","description":"

Instruct the SafariDriver to use the Safari Technology Preview if true.\nOtherwise, use the release version of Safari. Defaults to using the release version of Safari.

"},{"title":"module:selenium-webdriver/safari~ServiceBuilder","link":"ServiceBuilder"},{"title":"module:selenium-webdriver/safari~useTechnologyPreview","link":"useTechnologyPreview"},{"title":"of","link":"of","description":"

Creates a build of the listed targets.

"},{"title":"pac","link":"pac","description":"

Configures WebDriver to configure the browser proxy using the PAC file at\nthe given URL.

"},{"title":"pad","link":"pad","description":"

Pads a number to ensure it has a minimum of two digits.

"},{"title":"parseHttpResponse","link":"parseHttpResponse","description":"

Callback used to parse {@link Response} objects from a\n{@link HttpClient}.

"},{"title":"path","link":"path","description":"

This implementation is still in beta, and may change.

\n

Utility to find if a given file is present and executable.

"},{"title":"projectRoot","link":"projectRoot"},{"title":"proxy.js","link":"proxy.js","description":"

Proxy module alias.

\n
var webdriver = require('selenium-webdriver'),\n    proxy = require('selenium-webdriver/proxy');\n\nvar driver = new webdriver.Builder()\n    .withCapabilities(webdriver.Capabilities.chrome())\n    .setProxy(proxy.manual({http: 'host:1234'}))\n    .build();\n
"},{"title":"read","link":"read","description":"

Reads the contents of the given file.

"},{"title":"removeConsoleHandler","link":"removeConsoleHandler","description":"

Removes the console log handler from the given logger.

"},{"title":"requireAtom","link":"requireAtom"},{"title":"resolveCommandLineFlags","link":"resolveCommandLineFlags"},{"title":"resolveWaitMessage","link":"resolveWaitMessage","description":"

Resolves a wait message from either a function or a string.

"},{"title":"rmDir","link":"rmDir","description":"

Recursively removes a directory and all of its contents. This is equivalent\nto {@code rm -rf} on a POSIX system.

"},{"title":"sendIndex","link":"sendIndex","description":"

Responds to a request for the file server's main index.

"},{"title":"sendRequest","link":"sendRequest","description":"

Sends a single HTTP request.

"},{"title":"serialize","link":"serialize","description":"

Serializes a capabilities object. This is defined as a standalone function\nso it may be type checked (where Capabilities[Symbols.serialize] has type\nchecking disabled since it is defined with [] access on a struct).

"},{"title":"setFileDetector","link":"setFileDetector"},{"title":"shouldRetryRequest","link":"shouldRetryRequest","description":"

A retry is sometimes needed on Windows where we may quickly run out of\nephemeral ports. A more robust solution is bumping the MaxUserPort setting\nas described here: http://msdn.microsoft.com/en-us/library/aa560610%28v=bts.20%29.aspx

"},{"title":"socks","link":"socks","description":"

Creates a proxy configuration for a socks proxy.

\n

Example:

\n
const {Capabilities} = require('selenium-webdriver');\nconst proxy = require('selenium-webdriver/lib/proxy');\n\nlet capabilities = new Capabilities();\ncapabilities.setProxy(proxy.socks('localhost:1234'));\n\n// Or, to include authentication.\ncapabilities.setProxy(proxy.socks('bob:password@localhost:1234'));\n
"},{"title":"splitHostAndPort","link":"splitHostAndPort","description":"

Splits a hostport string, e.g. "www.example.com:80", into its component\nparts.

"},{"title":"stalenessOf","link":"stalenessOf","description":"

Creates a condition that will wait for the given element to become stale. An\nelement is considered stale once it is removed from the DOM, or a new page\nhas loaded.

"},{"title":"start","link":"start","description":"

Starts the server on the specified port.

"},{"title":"startSeleniumServer","link":"startSeleniumServer","description":"

Starts an instance of the Selenium server if not yet running.

"},{"title":"stat","link":"stat","description":"

Calls stat(2).

"},{"title":"stop","link":"stop","description":"

Stops the server.

"},{"title":"suite","link":"suite"},{"title":"suite","link":"suite","description":"

Defines a test suite by calling the provided function once for each of the\ntarget browsers. If a suite is not limited to a specific set of browsers in\nthe provided {@linkplain ./index.SuiteOptions suite options}, the suite will\nbe configured to run against each of the {@linkplain ./index.init runtime\ntarget browsers}.

\n

Sample usage:

\n
const {By, Key, until} = require('selenium-webdriver');\nconst {suite} = require('selenium-webdriver/testing');\n\nsuite(function(env) {\n  describe('Google Search', function() {\n    let driver;\n\n    before(async function() {\n      driver = await env.builder().build();\n    });\n\n    after(() => driver.quit());\n\n    it('demo', async function() {\n      await driver.get('http://www.google.com/ncr');\n\n      let q = await driver.findElement(By.name('q'));\n      await q.sendKeys('webdriver', Key.RETURN);\n      await driver.wait(\n          until.titleIs('webdriver - Google Search'), 1000);\n    });\n  });\n});\n
\n

By default, this example suite will run against every WebDriver-enabled\nbrowser on the current system. Alternatively, the SELENIUM_BROWSER\nenvironment variable may be used to run against a specific browser:

\n
SELENIUM_BROWSER=firefox mocha -t 120000 example_test.js\n
"},{"title":"system","link":"system","description":"

Configures WebDriver to use the current system's proxy.

"},{"title":"testing/index.js","link":"testing/index.js","description":"

Provides extensions for\nJasmine and Mocha.

\n

You may conditionally suppress a test function using the exported\n"ignore" function. If the provided predicate returns true, the attached\ntest case will be skipped:

\n
test.ignore(maybe()).it('is flaky', function() {\n  if (Math.random() < 0.5) throw Error();\n});\n\nfunction maybe() { return Math.random() < 0.5; }\n
"},{"title":"thenFinally","link":"thenFinally","description":"

Registers a listener to invoke when a promise is resolved, regardless\nof whether the promise's value was successfully computed. This function\nis synonymous with the {@code finally} clause in a synchronous API:

\n
// Synchronous API:\ntry {\n  doSynchronousWork();\n} finally {\n  cleanUp();\n}\n\n// Asynchronous promise API:\ndoAsynchronousWork().finally(cleanUp);\n
\n

Note: similar to the {@code finally} clause, if the registered\ncallback returns a rejected promise or throws an error, it will silently\nreplace the rejection error (if any) from this promise:

\n
try {\n  throw Error('one');\n} finally {\n  throw Error('two');  // Hides Error: one\n}\n\nlet p = Promise.reject(Error('one'));\npromise.finally(p, function() {\n  throw Error('two');  // Hides Error: one\n});\n
"},{"title":"throwDecodedError","link":"throwDecodedError","description":"

Throws an error coded from the W3C protocol. A generic error will be thrown\nif the provided data is not a valid encoded error.

"},{"title":"titleContains","link":"titleContains","description":"

Creates a condition that will wait for the current page's title to contain\nthe given substring.

"},{"title":"titleIs","link":"titleIs","description":"

Creates a condition that will wait for the current page's title to match the\ngiven value.

"},{"title":"titleMatches","link":"titleMatches","description":"

Creates a condition that will wait for the current page's title to match the\ngiven regular expression.

"},{"title":"tmpDir","link":"tmpDir"},{"title":"tmpFile","link":"tmpFile"},{"title":"toExecuteAtomCommand","link":"toExecuteAtomCommand"},{"title":"toMap","link":"toMap","description":"

Converts a generic hash object to a map.

"},{"title":"toWireValue","link":"toWireValue","description":"

Converts an object to its JSON representation in the WebDriver wire protocol.\nWhen converting values of type object, the following steps will be taken:

\n
    \n
  1. if the object is a WebElement, the return value will be the element's\n server ID\n
  2. if the object defines a {@link Symbols.serialize} method, this algorithm\n will be recursively applied to the object's serialized representation\n
  3. if the object provides a \"toJSON\" function, this algorithm will\n recursively be applied to the result of that function\n
  4. otherwise, the value of each key will be recursively converted according\n to the rules above.\n
"},{"title":"tryParse","link":"tryParse"},{"title":"unlink","link":"unlink","description":"

Deletes a name from the filesystem and possibly the file it refers to. Has\nno effect if the file does not exist.

"},{"title":"unzip","link":"unzip","description":"

Asynchronously unzips an archive file.

"},{"title":"url","link":"url","description":"

Formats a URL for this server.

"},{"title":"urlContains","link":"urlContains","description":"

Creates a condition that will wait for the current page's url to contain\nthe given substring.

"},{"title":"urlIs","link":"urlIs","description":"

Creates a condition that will wait for the current page's url to match the\ngiven value.

"},{"title":"urlMatches","link":"urlMatches","description":"

Creates a condition that will wait for the current page's url to match the\ngiven regular expression.

"},{"title":"value.sessionId","link":"sessionId"},{"title":"waitForServer","link":"waitForServer","description":"

Waits for a WebDriver server to be healthy and accepting requests.

"},{"title":"waitForUrl","link":"waitForUrl","description":"

Polls a URL with GET requests until it returns a 2xx response or the\ntimeout expires.

"},{"title":"walkDir","link":"walkDir","description":"

Recursively walks a directory, returning a promise that will resolve with\na list of all files/directories seen.

"},{"title":"whereIs","link":"whereIs","description":"

Builds the URL for a file in the //common/src/web directory of the\nSelenium client.

"},{"title":"withTagName","link":"withTagName","description":"

Start Searching for relative objects using the value returned from\nBy.tagName().

\n

Note: this method will likely be removed in the future please use\nlocateWith.

"},{"title":"write","link":"write","description":"

Writes to a file.

"}]} \ No newline at end of file +{"list":[{"title":"~resp.response.headers","link":"response.headers"},{"title":"~resp.response.statusCode","link":"response.statusCode"},{"title":"Action","link":"Action"},{"title":"Action#button","link":"button"},{"title":"Action#duration","link":"duration"},{"title":"Action#type","link":"type"},{"title":"Action#value","link":"value"},{"title":"Action#x","link":"x"},{"title":"Action#y","link":"y"},{"title":"Action.Type","link":"Type"},{"title":"Action.Type.KEY_DOWN","link":"KEY_DOWN"},{"title":"Action.Type.KEY_UP","link":"KEY_UP"},{"title":"Action.Type.PAUSE","link":"PAUSE"},{"title":"Action.Type.POINTER_CANCEL","link":"POINTER_CANCEL"},{"title":"Action.Type.POINTER_DOWN","link":"POINTER_DOWN"},{"title":"Action.Type.POINTER_MOVE","link":"POINTER_MOVE"},{"title":"Action.Type.POINTER_UP","link":"POINTER_UP"},{"title":"Action.Type.SCROLL","link":"SCROLL"},{"title":"Actions","link":"Actions"},{"title":"Actions#clear","link":"clear","description":"

Releases all keys, pointers, and clears internal state.

"},{"title":"Actions#click","link":"click","description":"

Short-hand for performing a simple left-click (down/up) with the mouse.

"},{"title":"Actions#contextClick","link":"contextClick","description":"

Short-hand for performing a simple right-click (down/up) with the mouse.

"},{"title":"Actions#doubleClick","link":"doubleClick","description":"

Short-hand for performing a double left-click with the mouse.

"},{"title":"Actions#dragAndDrop","link":"dragAndDrop","description":"

Configures a drag-and-drop action consisting of the following steps:

\n
    \n
  1. Move to the center of the from element (element to be dragged).
  2. \n
  3. Press the left mouse button.
  4. \n
  5. If the to target is a {@linkplain ./webdriver.WebElement WebElement},\nmove the mouse to its center. Otherwise, move the mouse by the\nspecified offset.
  6. \n
  7. Release the left mouse button.
  8. \n
"},{"title":"Actions#insert","link":"insert","description":"

Appends actions to the end of the current sequence for the given\ndevice. If device synchronization is enabled, after inserting the\nactions, pauses will be inserted for all other devices to ensure all action\nsequences are the same length.

"},{"title":"Actions#keyDown","link":"keyDown","description":"

Inserts an action to press a single key.

"},{"title":"Actions#keyUp","link":"keyUp","description":"

Inserts an action to release a single key.

"},{"title":"Actions#keyboard","link":"keyboard"},{"title":"Actions#mouse","link":"mouse"},{"title":"Actions#move","link":"move","description":"

Inserts an action for moving the mouse x and y pixels relative to the\nspecified origin. The origin may be defined as the mouse's\n{@linkplain ./input.Origin.POINTER current position}, the top-left corner of the\n{@linkplain ./input.Origin.VIEWPORT viewport}, or the center of a specific\n{@linkplain ./webdriver.WebElement WebElement}. Default is top left corner of the view-port if origin is not specified

\n

You may adjust how long the remote end should take, in milliseconds, to\nperform the move using the duration parameter (defaults to 100 ms).\nThe number of incremental move events generated over this duration is an\nimplementation detail for the remote end.

"},{"title":"Actions#pause","link":"pause","description":"

Inserts a pause action for the specified devices, ensuring each device is\nidle for a tick. The length of the pause (in milliseconds) may be specified\nas the first parameter to this method (defaults to 0). Otherwise, you may\njust specify the individual devices that should pause.

\n

If no devices are specified, a pause action will be created (using the same\nduration) for every device.

\n

When device synchronization is enabled (the default for new {@link Actions}\nobjects), there is no need to specify devices as pausing one automatically\npauses the others for the same duration. In other words, the following are\nall equivalent:

\n
let a1 = driver.actions();\na1.pause(100).perform();\n\nlet a2 = driver.actions();\na2.pause(100, a2.keyboard()).perform();\n// Synchronization ensures a2.mouse() is automatically paused too.\n\nlet a3 = driver.actions();\na3.pause(100, a3.keyboard(), a3.mouse()).perform();\n
\n

When device synchronization is disabled, you can cause individual devices\nto pause during a tick. For example, to hold the SHIFT key down while\nmoving the mouse:

\n
let actions = driver.actions({async: true});\n\nactions.keyDown(Key.SHIFT);\nactions.pause(actions.mouse())  // Pause for shift down\n    .press(Button.LEFT)\n    .move({x: 10, y: 10})\n    .release(Button.LEFT);\nactions\n    .pause(\n        actions.keyboard(),  // Pause for press left\n        actions.keyboard(),  // Pause for move\n        actions.keyboard())  // Pause for release left\n   .keyUp(Key.SHIFT);\nawait actions.perform();\n
"},{"title":"Actions#perform","link":"perform","description":"

Performs the configured action sequence.

"},{"title":"Actions#press","link":"press","description":"

Inserts an action to press a mouse button at the mouse's current location.

"},{"title":"Actions#release","link":"release","description":"

Inserts an action to release a mouse button at the mouse's current\nlocation.

"},{"title":"Actions#scroll","link":"scroll","description":"

scrolls a page via the coordinates given

"},{"title":"Actions#sendKeys","link":"sendKeys","description":"

Inserts a sequence of actions to type the provided key sequence.\nFor each key, this will record a pair of {@linkplain #keyDown keyDown}\nand {@linkplain #keyUp keyUp} actions. An implication of this pairing\nis that modifier keys (e.g. {@link ./input.Key.SHIFT Key.SHIFT}) will\nalways be immediately released. In other words, sendKeys(Key.SHIFT, 'a')\nis the same as typing sendKeys('a'), not sendKeys('A').

"},{"title":"Actions#synchronize","link":"synchronize","description":"

Ensures the action sequence for every device referenced in this action\nsequence is the same length. For devices whose sequence is too short,\nthis will insert {@linkplain #pause pauses} so that every device has an\nexplicit action defined at each tick.

"},{"title":"Actions#wheel","link":"wheel"},{"title":"AddInterceptParameters#urlPattern","link":"urlPattern","description":"

Adds a URL pattern to intercept.

"},{"title":"AddInterceptParameters#urlPatterns","link":"urlPatterns","description":"

Adds array of URL patterns to intercept.

"},{"title":"AddInterceptParameters#urlStringPattern","link":"urlStringPattern","description":"

Adds string URL to intercept.

"},{"title":"AddInterceptParameters#urlStringPatterns","link":"urlStringPatterns","description":"

Adds array of string URLs to intercept.

"},{"title":"Alert","link":"Alert"},{"title":"Alert#accept","link":"accept","description":"

Accepts this alert.

"},{"title":"Alert#dismiss","link":"dismiss","description":"

Dismisses this alert.

"},{"title":"Alert#getText","link":"getText","description":"

Retrieves the message text displayed with this alert. For instance, if the\nalert were opened with alert("hello"), then this would return "hello".

"},{"title":"Alert#sendKeys","link":"sendKeys","description":"

Sets the response text on this alert. This command will return an error if\nthe underlying alert does not support response text (e.g. window.alert and\nwindow.confirm).

"},{"title":"AlertPromise","link":"AlertPromise"},{"title":"AlertPromise#accept","link":"accept","description":"

Defers action until the alert has been located.

"},{"title":"AlertPromise#catch","link":"catch"},{"title":"AlertPromise#dismiss","link":"dismiss","description":"

Defers action until the alert has been located.

"},{"title":"AlertPromise#getText","link":"getText","description":"

Defer returning text until the promised alert has been resolved.

"},{"title":"AlertPromise#sendKeys","link":"sendKeys","description":"

Defers action until the alert has been located.

"},{"title":"AlertPromise#then","link":"then"},{"title":"ArgumentValue","link":"ArgumentValue"},{"title":"Atom","link":"Atom"},{"title":"Atom.FIND_ELEMENTS","link":"FIND_ELEMENTS"},{"title":"Atom.GET_ATTRIBUTE","link":"GET_ATTRIBUTE"},{"title":"Atom.IS_DISPLAYED","link":"IS_DISPLAYED"},{"title":"BaseLogEntry","link":"BaseLogEntry","description":"

Creates a new instance of BaseLogEntry.

"},{"title":"BaseLogEntry#level","link":"level","description":"

Gets the log level.

"},{"title":"BaseLogEntry#stackTrace","link":"stackTrace","description":"

Gets the log stack trace.

"},{"title":"BaseLogEntry#text","link":"text","description":"

Gets the log text.

"},{"title":"BaseLogEntry#timeStamp","link":"timeStamp","description":"

Gets the log timestamp.

"},{"title":"BaseParameters","link":"BaseParameters"},{"title":"BaseParameters#id","link":"id","description":"

Gets the browsing context ID of the network request.

"},{"title":"BaseParameters#navigation","link":"navigation","description":"

Gets the navigation information associated with the network request.

"},{"title":"BaseParameters#redirectCount","link":"redirectCount","description":"

Gets the number of redirects that occurred during the network request.

"},{"title":"BaseParameters#request","link":"request","description":"

Gets the request data for the network request.

"},{"title":"BaseParameters#timestamp","link":"timestamp","description":"

Gets the timestamp of the network request.

"},{"title":"BeforeRequestSent","link":"BeforeRequestSent"},{"title":"BeforeRequestSent#initiator","link":"initiator","description":"

Get the initiator of the request.

"},{"title":"BoxClipRectangle","link":"BoxClipRectangle","description":"

Constructs a new BoxClipRectangle object.

"},{"title":"BoxClipRectangle#asMap","link":"asMap","description":"

Converts the BoxClipRectangle object to a Map.

"},{"title":"Browser","link":"Browser"},{"title":"Browser","link":"Browser","description":"

Recognized browser names.

"},{"title":"Browser#createUserContext","link":"createUserContext","description":"

Creates a new user context.

"},{"title":"Browser#getClientWindows","link":"getClientWindows","description":"

Gets information about all client windows.

"},{"title":"Browser#getUserContexts","link":"getUserContexts","description":"

Gets the list of all user contexts.

"},{"title":"Browser#removeUserContext","link":"removeUserContext","description":"

Removes a user context.

"},{"title":"Browser.CHROME","link":"CHROME"},{"title":"Browser.EDGE","link":"EDGE"},{"title":"Browser.FIREFOX","link":"FIREFOX"},{"title":"Browser.INTERNET_EXPLORER","link":"INTERNET_EXPLORER"},{"title":"Browser.SAFARI","link":"SAFARI"},{"title":"BrowsingContext","link":"BrowsingContext"},{"title":"BrowsingContext#activate","link":"activate","description":"

Activates and focuses the top-level browsing context.

"},{"title":"BrowsingContext#back","link":"back","description":"

Navigates the browsing context to the previous page in the history.

"},{"title":"BrowsingContext#captureElementScreenshot","link":"captureElementScreenshot","description":"

Captures a screenshot of a specific element within the browsing context.

"},{"title":"BrowsingContext#captureScreenshot","link":"captureScreenshot","description":"

Captures a screenshot of the browsing context.

"},{"title":"BrowsingContext#close","link":"close","description":"

Closes the browsing context

"},{"title":"BrowsingContext#create","link":"create","description":"

Creates a browsing context for the given type with the given parameters

"},{"title":"BrowsingContext#forward","link":"forward","description":"

Moves the browsing context forward by one step in the history.

"},{"title":"BrowsingContext#getTopLevelContexts","link":"getTopLevelContexts"},{"title":"BrowsingContext#getTree","link":"getTree"},{"title":"BrowsingContext#handleUserPrompt","link":"handleUserPrompt","description":"

Handles a user prompt in the browsing context.

"},{"title":"BrowsingContext#id","link":"id"},{"title":"BrowsingContext#locateNode","link":"locateNode","description":"

Locates a single node in the browsing context.

"},{"title":"BrowsingContext#locateNodes","link":"locateNodes","description":"

Locates nodes in the browsing context.

"},{"title":"BrowsingContext#navigate","link":"navigate"},{"title":"BrowsingContext#printPage","link":"printPage","description":"

Prints PDF of the webpage

"},{"title":"BrowsingContext#reload","link":"reload","description":"

Reloads the current browsing context.

"},{"title":"BrowsingContext#setViewport","link":"setViewport","description":"

Sets the viewport size and device pixel ratio for the browsing context.

"},{"title":"BrowsingContext#traverseHistory","link":"traverseHistory","description":"

Traverses the browsing context history by a given delta.

"},{"title":"BrowsingContextInfo","link":"BrowsingContextInfo"},{"title":"BrowsingContextInfo#children","link":"children","description":"

Get the children of the browsing context.

"},{"title":"BrowsingContextInfo#id","link":"id","description":"

Get the ID of the browsing context.

"},{"title":"BrowsingContextInfo#parentBrowsingContext","link":"parentBrowsingContext","description":"

Get the parent browsing context.

"},{"title":"BrowsingContextInfo#url","link":"url","description":"

Get the URL of the browsing context.

"},{"title":"BrowsingContextInspector","link":"BrowsingContextInspector"},{"title":"BrowsingContextInspector#onBrowsingContextCreated","link":"onBrowsingContextCreated","description":"

Subscribes to the 'browsingContext.contextCreated' event.

"},{"title":"BrowsingContextInspector#onBrowsingContextDestroyed","link":"onBrowsingContextDestroyed","description":"

Subscribes to the 'browsingContext.contextDestroyed' event.

"},{"title":"BrowsingContextInspector#onBrowsingContextLoaded","link":"onBrowsingContextLoaded","description":"

Subscribes to the 'browsingContext.load' event.

"},{"title":"BrowsingContextInspector#onDomContentLoaded","link":"onDomContentLoaded","description":"

Subscribes to the 'browsingContext.domContentLoaded' event.

"},{"title":"BrowsingContextInspector#onFragmentNavigated","link":"onFragmentNavigated","description":"

Subscribes to the 'browsingContext.fragmentNavigated' event.

"},{"title":"BrowsingContextInspector#onNavigationStarted","link":"onNavigationStarted","description":"

Subscribe to the 'browsingContext.navigationStarted' event.

"},{"title":"BrowsingContextInspector#onUserPromptClosed","link":"onUserPromptClosed","description":"

Subscribes to the 'browsingContext.userPromptClosed' event.

"},{"title":"BrowsingContextInspector#onUserPromptOpened","link":"onUserPromptOpened","description":"

Subscribes to the 'browsingContext.userPromptOpened' event.

"},{"title":"BrowsingContextPartitionDescriptor","link":"BrowsingContextPartitionDescriptor"},{"title":"Build","link":"Build"},{"title":"Build#go","link":"go","description":"

Executes the build.

"},{"title":"Build#onlyOnce","link":"onlyOnce","description":"

Configures this build to only execute if it has not previously been\nrun during the life of the current process.

"},{"title":"Builder","link":"Builder"},{"title":"Builder#build","link":"build","description":"

Creates a new WebDriver client based on this builder's current\nconfiguration.

\n

This method will return a {@linkplain ThenableWebDriver} instance, allowing\nusers to issue commands directly without calling then(). The returned\nthenable wraps a promise that will resolve to a concrete\n{@linkplain webdriver.WebDriver WebDriver} instance. The promise will be\nrejected if the remote end fails to create a new session.

"},{"title":"Builder#disableEnvironmentOverrides","link":"disableEnvironmentOverrides","description":"

Configures this builder to ignore any environment variable overrides and to\nonly use the configuration specified through this instance's API.

"},{"title":"Builder#forBrowser","link":"forBrowser","description":"

Configures the target browser for clients created by this instance.\nAny calls to {@link #withCapabilities} after this function will\noverwrite these settings.

\n

You may also define the target browser using the {@code SELENIUM_BROWSER}\nenvironment variable. If set, this environment variable should be of the\nform browser[:[version][:platform]].

"},{"title":"Builder#getCapabilities","link":"getCapabilities","description":"

Returns the base set of capabilities this instance is currently configured\nto use.

"},{"title":"Builder#getChromeOptions","link":"getChromeOptions"},{"title":"Builder#getFirefoxOptions","link":"getFirefoxOptions"},{"title":"Builder#getHttpAgent","link":"getHttpAgent"},{"title":"Builder#getSafariOptions","link":"getSafariOptions"},{"title":"Builder#getServerUrl","link":"getServerUrl"},{"title":"Builder#getWebDriverProxy","link":"getWebDriverProxy"},{"title":"Builder#setAlertBehavior","link":"setAlertBehavior","description":"

Sets the default action to take with an unexpected alert before returning\nan error.

"},{"title":"Builder#setCapability","link":"setCapability","description":"

Sets the desired capability when requesting a new session.\nIf there is already a capability named key, its value will be overwritten with value.\nThis is a convenience wrapper around builder.getCapabilities().set(key, value) to support Builder method chaining.

"},{"title":"Builder#setChromeOptions","link":"setChromeOptions","description":"

Sets Chrome specific {@linkplain chrome.Options options} for drivers\ncreated by this builder. Any logging or proxy settings defined on the given\noptions will take precedence over those set through\n{@link #setLoggingPrefs} and {@link #setProxy}, respectively.

"},{"title":"Builder#setChromeService","link":"setChromeService","description":"

Sets the service builder to use for managing the chromedriver child process\nwhen creating new Chrome sessions.

"},{"title":"Builder#setEdgeOptions","link":"setEdgeOptions","description":"

Set {@linkplain edge.Options options} specific to Microsoft's Edge browser\nfor drivers created by this builder. Any proxy settings defined on the\ngiven options will take precedence over those set through\n{@link #setProxy}.

"},{"title":"Builder#setEdgeService","link":"setEdgeService","description":"

Sets the {@link edge.ServiceBuilder} to use to manage the\nMicrosoftEdgeDriver child process when creating sessions locally.

"},{"title":"Builder#setFirefoxOptions","link":"setFirefoxOptions","description":"

Sets Firefox specific {@linkplain firefox.Options options} for drivers\ncreated by this builder. Any logging or proxy settings defined on the given\noptions will take precedence over those set through\n{@link #setLoggingPrefs} and {@link #setProxy}, respectively.

"},{"title":"Builder#setFirefoxService","link":"setFirefoxService","description":"

Sets the {@link firefox.ServiceBuilder} to use to manage the geckodriver\nchild process when creating Firefox sessions locally.

"},{"title":"Builder#setIeOptions","link":"setIeOptions","description":"

Set Internet Explorer specific {@linkplain ie.Options options} for drivers\ncreated by this builder. Any proxy settings defined on the given options\nwill take precedence over those set through {@link #setProxy}.

"},{"title":"Builder#setIeService","link":"setIeService","description":"

Sets the {@link ie.ServiceBuilder} to use to manage the geckodriver\nchild process when creating IE sessions locally.

"},{"title":"Builder#setLoggingPrefs","link":"setLoggingPrefs","description":"

Sets the logging preferences for the created session. Preferences may be\nchanged by repeated calls, or by calling {@link #withCapabilities}.

"},{"title":"Builder#setProxy","link":"setProxy","description":"

Sets the proxy configuration for the target browser.\nAny calls to {@link #withCapabilities} after this function will\noverwrite these settings.

"},{"title":"Builder#setSafariOptions","link":"setSafariOptions","description":"

Sets Safari specific {@linkplain safari.Options options} for drivers\ncreated by this builder. Any logging settings defined on the given options\nwill take precedence over those set through {@link #setLoggingPrefs}.

"},{"title":"Builder#usingHttpAgent","link":"usingHttpAgent","description":"

Sets the http agent to use for each request.\nIf this method is not called, the Builder will use http.globalAgent by default.

"},{"title":"Builder#usingServer","link":"usingServer","description":"

Sets the URL of a remote WebDriver server to use. Once a remote URL has\nbeen specified, the builder direct all new clients to that server. If this\nmethod is never called, the Builder will attempt to create all clients\nlocally.

\n

As an alternative to this method, you may also set the\nSELENIUM_REMOTE_URL environment variable.

"},{"title":"Builder#usingWebDriverProxy","link":"usingWebDriverProxy","description":"

Sets the URL of the proxy to use for the WebDriver's HTTP connections.\nIf this method is never called, the Builder will create a connection\nwithout a proxy.

"},{"title":"Builder#withCapabilities","link":"withCapabilities","description":"

Recommended way is to use set*Options where * is the browser(eg setChromeOptions)

\n

Sets the desired capabilities when requesting a new session. This will\noverwrite any previously set capabilities.

"},{"title":"Button","link":"Button","description":"

Enumeration of the buttons used in the advanced interactions API.

"},{"title":"Button.BACK","link":"BACK"},{"title":"Button.FORWARD","link":"FORWARD"},{"title":"Button.LEFT","link":"LEFT"},{"title":"Button.MIDDLE","link":"MIDDLE"},{"title":"Button.RIGHT","link":"RIGHT"},{"title":"By","link":"By"},{"title":"By#toString","link":"toString"},{"title":"By#using","link":"using"},{"title":"By#value","link":"value"},{"title":"By.className","link":"className","description":"

Locates elements that have a specific class name.

"},{"title":"By.css","link":"css","description":"

Locates elements using a CSS selector.

"},{"title":"By.id","link":"id","description":"

Locates elements by the ID attribute. This locator uses the CSS selector\n*[id="$ID"], not document.getElementById.

"},{"title":"By.js","link":"js","description":"

Locates elements by evaluating a script that defines the body of\na {@linkplain webdriver.WebDriver#executeScript JavaScript function}.\nThe return value of this function must be an element or an array-like\nlist of elements. When this locator returns a list of elements, but only\none is expected, the first element in this list will be used as the\nsingle element value.

"},{"title":"By.linkText","link":"linkText","description":"

Locates link elements whose\n{@linkplain webdriver.WebElement#getText visible text} matches the given\nstring.

"},{"title":"By.name","link":"name","description":"

Locates elements whose name attribute has the given value.

"},{"title":"By.partialLinkText","link":"partialLinkText","description":"

Locates link elements whose\n{@linkplain webdriver.WebElement#getText visible text} contains the given\nsubstring.

"},{"title":"By.tagName","link":"tagName","description":"

Locates elements with a given tag name.

"},{"title":"By.xpath","link":"xpath","description":"

Locates elements matching a XPath selector. Care should be taken when\nusing an XPath selector with a {@link webdriver.WebElement} as WebDriver\nwill respect the context in the specified in the selector. For example,\ngiven the selector //div, WebDriver will search from the document root\nregardless of whether the locator was used with a WebElement.

"},{"title":"ByHash","link":"ByHash","description":"

Short-hand expressions for the primary element locator strategies.\nFor example the following two statements are equivalent:

\n
var e1 = driver.findElement(By.id('foo'));\nvar e2 = driver.findElement({id: 'foo'});\n
\n

Care should be taken when using JavaScript minifiers (such as the\nClosure compiler), as locator hashes will always be parsed using\nthe un-obfuscated properties listed.

"},{"title":"BytesValue","link":"BytesValue","description":"

Creates a new BytesValue instance.

"},{"title":"BytesValue#asMap","link":"asMap","description":"

Converts the BytesValue to a map.

"},{"title":"BytesValue#type","link":"type","description":"

Gets the type of the BytesValue.

"},{"title":"BytesValue#value","link":"value","description":"

Gets the value of the BytesValue.

"},{"title":"Capabilities","link":"Capabilities"},{"title":"Capabilities#Symbols.serialize","link":"serialize"},{"title":"Capabilities#delete","link":"delete","description":"

Deletes an entry from this set of capabilities.

"},{"title":"Capabilities#get","link":"get"},{"title":"Capabilities#getAcceptInsecureCerts","link":"getAcceptInsecureCerts"},{"title":"Capabilities#getAlertBehavior","link":"getAlertBehavior"},{"title":"Capabilities#getBrowserName","link":"getBrowserName"},{"title":"Capabilities#getBrowserVersion","link":"getBrowserVersion"},{"title":"Capabilities#getPageLoadStrategy","link":"getPageLoadStrategy","description":"

Returns the configured page load strategy.

"},{"title":"Capabilities#getPlatform","link":"getPlatform"},{"title":"Capabilities#getProxy","link":"getProxy"},{"title":"Capabilities#has","link":"has"},{"title":"Capabilities#keys","link":"keys"},{"title":"Capabilities#merge","link":"merge","description":"

Merges another set of capabilities into this instance.

"},{"title":"Capabilities#set","link":"set"},{"title":"Capabilities#setAcceptInsecureCerts","link":"setAcceptInsecureCerts","description":"

Sets whether a WebDriver session should implicitly accept self-signed, or\nother untrusted TLS certificates on navigation.

"},{"title":"Capabilities#setAlertBehavior","link":"setAlertBehavior","description":"

Sets the default action to take with an unexpected alert before returning\nan error. If unspecified, WebDriver will default to\n{@link UserPromptHandler.DISMISS_AND_NOTIFY}.

"},{"title":"Capabilities#setBrowserName","link":"setBrowserName","description":"

Sets the name of the target browser.

"},{"title":"Capabilities#setBrowserVersion","link":"setBrowserVersion","description":"

Sets the desired version of the target browser.

"},{"title":"Capabilities#setLoggingPrefs","link":"setLoggingPrefs","description":"

Sets the logging preferences. Preferences may be specified as a\n{@link ./logging.Preferences} instance, or as a map of log-type to\nlog-level.

"},{"title":"Capabilities#setPageLoadStrategy","link":"setPageLoadStrategy","description":"

Sets the desired page loading strategy for a new WebDriver session.

"},{"title":"Capabilities#setPlatform","link":"setPlatform","description":"

Sets the target platform.

"},{"title":"Capabilities#setProxy","link":"setProxy","description":"

Sets the proxy configuration for this instance.

"},{"title":"Capabilities#setStrictFileInteractability","link":"setStrictFileInteractability","description":"

Sets the boolean flag configuration for this instance.

"},{"title":"Capabilities#size","link":"size"},{"title":"Capabilities.chrome","link":"chrome"},{"title":"Capabilities.edge","link":"edge"},{"title":"Capabilities.firefox","link":"firefox"},{"title":"Capabilities.ie","link":"ie"},{"title":"Capabilities.safari","link":"safari"},{"title":"Capability","link":"Capability","description":"

The standard WebDriver capability keys.

"},{"title":"Capability.ACCEPT_INSECURE_TLS_CERTS","link":"ACCEPT_INSECURE_TLS_CERTS","description":"

Indicates whether a WebDriver session implicitly trusts otherwise untrusted\nand self-signed TLS certificates during navigation.

"},{"title":"Capability.BROWSER_NAME","link":"BROWSER_NAME","description":"

The browser name. Common browser names are defined in the\n{@link ./capabilities.Browser Browser} enum.

"},{"title":"Capability.BROWSER_VERSION","link":"BROWSER_VERSION","description":"

Identifies the browser version.

"},{"title":"Capability.ENABLE_DOWNLOADS","link":"ENABLE_DOWNLOADS"},{"title":"Capability.LOGGING_PREFS","link":"LOGGING_PREFS","description":"

Key for the logging driver logging preferences.\nThe browser name. Common browser names are defined in the\n{@link ./capabilities.Browser Browser} enum.

"},{"title":"Capability.PAGE_LOAD_STRATEGY","link":"PAGE_LOAD_STRATEGY","description":"

Defines the session's\n{@linkplain ./capabilities.PageLoadStrategy page loading strategy}.

"},{"title":"Capability.PLATFORM_NAME","link":"PLATFORM_NAME","description":"

Identifies the operating system of the endpoint node. Common values\nrecognized by the most WebDriver server implementations are predefined in\nthe {@link ./capabilities.Platform Platform} enum.

"},{"title":"Capability.PROXY","link":"PROXY","description":"

Describes the proxy configuration to use for a new WebDriver session.

"},{"title":"Capability.SET_WINDOW_RECT","link":"SET_WINDOW_RECT","description":"

Indicates whether the remote end supports all of the window resizing and\npositioning commands:

\n
    \n
  • {@linkplain ./webdriver.Window#getRect Window.getRect()}
  • \n
  • {@linkplain ./webdriver.Window#setRect Window.setRect()}
  • \n
  • {@linkplain ./webdriver.Window#maximize Window.maximize()}
  • \n
  • {@linkplain ./webdriver.Window#minimize Window.minimize()}
  • \n
  • {@linkplain ./webdriver.Window#fullscreen Window.fullscreen()}
  • \n
"},{"title":"Capability.STRICT_FILE_INTERACTABILITY","link":"STRICT_FILE_INTERACTABILITY","description":"

Defines the current session’s strict file interactability.\nUsed to upload a file when strict file interactability is on

"},{"title":"Capability.TIMEOUTS","link":"TIMEOUTS","description":"

Describes the {@linkplain ./capabilities.Timeouts timeouts} imposed on\ncertain session operations.

"},{"title":"Capability.UNHANDLED_PROMPT_BEHAVIOR","link":"UNHANDLED_PROMPT_BEHAVIOR","description":"

Defines how a WebDriver session should\n{@linkplain ./capabilities.UserPromptHandler respond} to unhandled user\nprompts.

"},{"title":"CaptureScreenshotParameters","link":"CaptureScreenshotParameters"},{"title":"CaptureScreenshotParameters#clipRectangle","link":"clipRectangle","description":"

Sets the clip rectangle for capturing a screenshot.

"},{"title":"CaptureScreenshotParameters#imageFormat","link":"imageFormat","description":"

Sets the image format and quality for capturing a screenshot.

"},{"title":"CaptureScreenshotParameters#origin","link":"origin","description":"

Sets the origin for capturing the screenshot.

"},{"title":"ChannelValue","link":"ChannelValue"},{"title":"Client","link":"Client"},{"title":"Client#send","link":"send","description":"

Sends a request to the server. The client will automatically follow any\nredirects returned by the server, fulfilling the returned promise with the\nfinal response.

"},{"title":"ClientWindowInfo","link":"ClientWindowInfo"},{"title":"ClipRectangle","link":"ClipRectangle","description":"

Constructs a new ClipRectangle object.

"},{"title":"ClipRectangle#type","link":"type","description":"

Gets the type of the clip rectangle.

"},{"title":"Command","link":"Command"},{"title":"Command","link":"Command"},{"title":"Command#getName","link":"getName"},{"title":"Command#getParameter","link":"getParameter","description":"

Returns a named command parameter.

"},{"title":"Command#getParameters","link":"getParameters"},{"title":"Command#kill","link":"kill","description":"

Sends a signal to the underlying process.

"},{"title":"Command#result","link":"result"},{"title":"Command#setParameter","link":"setParameter","description":"

Sets a parameter to send with this command.

"},{"title":"Command#setParameters","link":"setParameters","description":"

Sets the parameters for this command.

"},{"title":"CommandLineFlag","link":"CommandLineFlag"},{"title":"CommandSpec","link":"CommandSpec"},{"title":"CommandTransformer","link":"CommandTransformer"},{"title":"Condition","link":"Condition"},{"title":"Condition#description","link":"description"},{"title":"Condition#fn","link":"fn"},{"title":"Config","link":"Config","description":"

Describes how a proxy should be configured for a WebDriver session.

"},{"title":"Config","link":"Config"},{"title":"Config#proxyType","link":"proxyType","description":"

The proxy type.

"},{"title":"ConsoleLogEntry","link":"ConsoleLogEntry"},{"title":"ConsoleLogEntry#args","link":"args","description":"

Gets the arguments associated with the log entry.

"},{"title":"ConsoleLogEntry#method","link":"method","description":"

Gets the method associated with the log entry.

"},{"title":"ContinueRequestParameters","link":"ContinueRequestParameters"},{"title":"ContinueRequestParameters#body","link":"body","description":"

Sets the body value for the request.

"},{"title":"ContinueRequestParameters#cookies","link":"cookies","description":"

Sets the cookies for the request.

"},{"title":"ContinueRequestParameters#headers","link":"headers","description":"

Sets the headers for the request.

"},{"title":"ContinueRequestParameters#method","link":"method","description":"

Sets the HTTP method for the request.

"},{"title":"ContinueRequestParameters#url","link":"url","description":"

Sets the URL for the request.

"},{"title":"ContinueResponseParameters","link":"ContinueResponseParameters"},{"title":"ContinueResponseParameters#cookies","link":"cookies","description":"

Sets the cookies for the response.

"},{"title":"ContinueResponseParameters#credentials","link":"credentials","description":"

Sets the credentials for authentication.

"},{"title":"ContinueResponseParameters#headers","link":"headers","description":"

Sets the headers for the response.

"},{"title":"ContinueResponseParameters#reasonPhrase","link":"reasonPhrase","description":"

Sets the reason phrase for the response.

"},{"title":"ContinueResponseParameters#statusCode","link":"statusCode","description":"

Sets the status code for the response.

"},{"title":"Cookie","link":"Cookie"},{"title":"Cookie#domain","link":"domain","description":"

Gets the domain of the cookie.

"},{"title":"Cookie#expires","link":"expires","description":"

Gets the expiration date of the cookie.

"},{"title":"Cookie#httpOnly","link":"httpOnly","description":"

Checks if the cookie is HTTP-only.

"},{"title":"Cookie#name","link":"name","description":"

Gets the name of the cookie.

"},{"title":"Cookie#path","link":"path","description":"

Gets the path of the cookie.

"},{"title":"Cookie#sameSite","link":"sameSite","description":"

Gets the same-site attribute of the cookie.

"},{"title":"Cookie#secure","link":"secure","description":"

Checks if the cookie is secure.

"},{"title":"Cookie#size","link":"size","description":"

Gets the size of the cookie.

"},{"title":"Cookie#value","link":"value","description":"

Gets the value of the cookie.

"},{"title":"CookieFilter","link":"CookieFilter"},{"title":"CookieFilter#domain","link":"domain","description":"

Sets the domain for the cookie.

"},{"title":"CookieFilter#expiry","link":"expiry","description":"

Sets the expiry value.

"},{"title":"CookieFilter#httpOnly","link":"httpOnly","description":"

Sets the httpOnly flag for the cookie filter.

"},{"title":"CookieFilter#name","link":"name","description":"

Sets the name of the cookie.

"},{"title":"CookieFilter#path","link":"path","description":"

Sets the url path for the cookie to be fetched.

"},{"title":"CookieFilter#sameSite","link":"sameSite","description":"

Sets the SameSite attribute for the cookie.

"},{"title":"CookieFilter#secure","link":"secure","description":"

Sets the flag to fetch secure cookies.

"},{"title":"CookieFilter#size","link":"size","description":"

Sets the size of the cookie to be fetched.

"},{"title":"CookieFilter#value","link":"value","description":"

Sets the value of the cookie.

"},{"title":"CreateContextParameters","link":"CreateContextParameters"},{"title":"CreateContextParameters#background","link":"background","description":"

Sets the background parameter.

"},{"title":"CreateContextParameters#referenceContext","link":"referenceContext","description":"

Sets the reference context.

"},{"title":"CreateContextParameters#userContext","link":"userContext","description":"

Sets the user context.

"},{"title":"Credential","link":"Credential"},{"title":"Credential#createNonResidentCredential","link":"createNonResidentCredential","description":"

Creates a non-resident (i.e. stateless) credential.

"},{"title":"Credential#createResidentCredential","link":"createResidentCredential","description":"

Creates a resident (i.e. stateless) credential.

"},{"title":"Credential#fromDict","link":"fromDict","description":"

Creates a credential from a map.

"},{"title":"DetachedShadowRootError","link":"DetachedShadowRootError"},{"title":"Device","link":"Device"},{"title":"Device#toJSON","link":"toJSON"},{"title":"Device.Type","link":"Type","description":"

Device types supported by the WebDriver protocol.

"},{"title":"Device.Type.KEY","link":"KEY"},{"title":"Device.Type.NONE","link":"NONE"},{"title":"Device.Type.POINTER","link":"POINTER"},{"title":"Device.Type.WHEEL","link":"WHEEL"},{"title":"DriverService","link":"DriverService"},{"title":"DriverService#address","link":"address"},{"title":"DriverService#isRunning","link":"isRunning","description":"

Returns whether the underlying process is still running. This does not take\ninto account whether the process is in the process of shutting down.

"},{"title":"DriverService#kill","link":"kill","description":"

Stops the service if it is not currently running. This function will kill\nthe server immediately. To synchronize with the active control flow, use\n{@link #stop()}.

"},{"title":"DriverService#start","link":"start","description":"

Starts the server if it is not already running.

"},{"title":"DriverService.Builder","link":"Builder"},{"title":"DriverService.Builder#addArguments","link":"addArguments","description":"

Define additional command line arguments to use when starting the server.

"},{"title":"DriverService.Builder#build","link":"build","description":"

Creates a new DriverService using this instance's current configuration.

"},{"title":"DriverService.Builder#setEnvironment","link":"setEnvironment","description":"

Defines the environment to start the server under. This setting will be\ninherited by every browser session started by the server. By default, the\nserver will inherit the enviroment of the current process.

"},{"title":"DriverService.Builder#setHostname","link":"setHostname","description":"

Sets the host name to access the server on. If specified, the\n{@linkplain #setLoopback() loopback} setting will be ignored.

"},{"title":"DriverService.Builder#setLoopback","link":"setLoopback","description":"

Sets whether the service should be accessed at this host's loopback\naddress.

"},{"title":"DriverService.Builder#setPath","link":"setPath","description":"

Sets the base path for WebDriver REST commands (e.g. "/wd/hub").\nBy default, the driver will accept commands relative to "/".

"},{"title":"DriverService.Builder#setPort","link":"setPort","description":"

Sets the port to start the server on.

"},{"title":"DriverService.Builder#setStdio","link":"setStdio","description":"

IO configuration for the spawned server process. For more information,\nrefer to the documentation of child_process.spawn.

"},{"title":"DriverService.DEFAULT_START_TIMEOUT_MS","link":"DEFAULT_START_TIMEOUT_MS","description":"

The default amount of time, in milliseconds, to wait for the server to\nstart.

"},{"title":"ElementClickInterceptedError","link":"ElementClickInterceptedError"},{"title":"ElementClipRectangle","link":"ElementClipRectangle","description":"

Constructs a new ElementClipRectangle instance.

"},{"title":"ElementClipRectangle#asMap","link":"asMap","description":"

Converts the ElementClipRectangle instance to a map.

"},{"title":"ElementNotInteractableError","link":"ElementNotInteractableError"},{"title":"ElementNotSelectableError","link":"ElementNotSelectableError"},{"title":"Entry","link":"Entry"},{"title":"Entry#toJSON","link":"toJSON"},{"title":"Environment","link":"Environment"},{"title":"Environment#browser","link":"browser"},{"title":"Environment#browsers","link":"browsers","description":"

Returns a predicate function that will suppress tests in this environment\nif the {@linkplain #browser current browser} is in the list of\nbrowsersToIgnore.

"},{"title":"Environment#builder","link":"builder"},{"title":"ErrorCode","link":"ErrorCode","description":"

Enum of legacy error codes.\nTODO: remove this when all code paths have been switched to the new error\ntypes.

"},{"title":"ErrorCode.ELEMENT_CLICK_INTERCEPTED","link":"ELEMENT_CLICK_INTERCEPTED"},{"title":"ErrorCode.ELEMENT_NOT_INTERACTABLE","link":"ELEMENT_NOT_INTERACTABLE"},{"title":"ErrorCode.ELEMENT_NOT_SELECTABLE","link":"ELEMENT_NOT_SELECTABLE"},{"title":"ErrorCode.ELEMENT_NOT_VISIBLE","link":"ELEMENT_NOT_VISIBLE"},{"title":"ErrorCode.IME_ENGINE_ACTIVATION_FAILED","link":"IME_ENGINE_ACTIVATION_FAILED"},{"title":"ErrorCode.IME_NOT_AVAILABLE","link":"IME_NOT_AVAILABLE"},{"title":"ErrorCode.INVALID_ARGUMENT","link":"INVALID_ARGUMENT"},{"title":"ErrorCode.INVALID_COOKIE_DOMAIN","link":"INVALID_COOKIE_DOMAIN"},{"title":"ErrorCode.INVALID_ELEMENT_COORDINATES","link":"INVALID_ELEMENT_COORDINATES"},{"title":"ErrorCode.INVALID_ELEMENT_STATE","link":"INVALID_ELEMENT_STATE"},{"title":"ErrorCode.INVALID_SELECTOR_ERROR","link":"INVALID_SELECTOR_ERROR"},{"title":"ErrorCode.INVALID_XPATH_SELECTOR","link":"INVALID_XPATH_SELECTOR"},{"title":"ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPE","link":"INVALID_XPATH_SELECTOR_RETURN_TYPE"},{"title":"ErrorCode.JAVASCRIPT_ERROR","link":"JAVASCRIPT_ERROR"},{"title":"ErrorCode.METHOD_NOT_ALLOWED","link":"METHOD_NOT_ALLOWED"},{"title":"ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS","link":"MOVE_TARGET_OUT_OF_BOUNDS"},{"title":"ErrorCode.NO_SUCH_ALERT","link":"NO_SUCH_ALERT"},{"title":"ErrorCode.NO_SUCH_COOKIE","link":"NO_SUCH_COOKIE"},{"title":"ErrorCode.NO_SUCH_ELEMENT","link":"NO_SUCH_ELEMENT"},{"title":"ErrorCode.NO_SUCH_FRAME","link":"NO_SUCH_FRAME"},{"title":"ErrorCode.NO_SUCH_SESSION","link":"NO_SUCH_SESSION"},{"title":"ErrorCode.NO_SUCH_WINDOW","link":"NO_SUCH_WINDOW"},{"title":"ErrorCode.SCRIPT_TIMEOUT","link":"SCRIPT_TIMEOUT"},{"title":"ErrorCode.SESSION_NOT_CREATED","link":"SESSION_NOT_CREATED"},{"title":"ErrorCode.SQL_DATABASE_ERROR","link":"SQL_DATABASE_ERROR"},{"title":"ErrorCode.STALE_ELEMENT_REFERENCE","link":"STALE_ELEMENT_REFERENCE"},{"title":"ErrorCode.SUCCESS","link":"SUCCESS"},{"title":"ErrorCode.TIMEOUT","link":"TIMEOUT"},{"title":"ErrorCode.UNABLE_TO_CAPTURE_SCREEN","link":"UNABLE_TO_CAPTURE_SCREEN"},{"title":"ErrorCode.UNABLE_TO_SET_COOKIE","link":"UNABLE_TO_SET_COOKIE"},{"title":"ErrorCode.UNEXPECTED_ALERT_OPEN","link":"UNEXPECTED_ALERT_OPEN"},{"title":"ErrorCode.UNKNOWN_COMMAND","link":"UNKNOWN_COMMAND"},{"title":"ErrorCode.UNKNOWN_ERROR","link":"UNKNOWN_ERROR"},{"title":"ErrorCode.UNSUPPORTED_OPERATION","link":"UNSUPPORTED_OPERATION"},{"title":"ErrorCode.XPATH_LOOKUP_ERROR","link":"XPATH_LOOKUP_ERROR"},{"title":"EvaluateResultException","link":"EvaluateResultException"},{"title":"EvaluateResultSuccess","link":"EvaluateResultSuccess"},{"title":"EvaluateResultType","link":"EvaluateResultType","description":"

Represents the type of script evaluation result.\nDescribed in https://w3c.github.io/webdriver-bidi/#type-script-EvaluateResult.

"},{"title":"EvaluateResultType.EXCEPTION","link":"EXCEPTION"},{"title":"EvaluateResultType.SUCCESS","link":"SUCCESS"},{"title":"ExceptionDetails","link":"ExceptionDetails"},{"title":"Executor","link":"Executor"},{"title":"Executor","link":"Executor"},{"title":"Executor#defineCommand","link":"defineCommand","description":"

Defines a new command for use with this executor. When a command is sent,\nthe {@code path} will be preprocessed using the command's parameters; any\npath segments prefixed with ":" will be replaced by the parameter of the\nsame name. For example, given "/person/:name" and the parameters\n"{name: 'Bob'}", the final command path will be "/person/Bob".

"},{"title":"Executor#execute","link":"execute","description":"

Executes the given {@code command}. If there is an error executing the\ncommand, the provided callback will be invoked with the offending error.\nOtherwise, the callback will be invoked with a null Error and non-null\nresponse object.

"},{"title":"Executor#execute","link":"execute"},{"title":"FetchError","link":"FetchError","description":"

Creates a new FetchError instance.

"},{"title":"FetchError#errorText","link":"errorText","description":"

Gets the error text.

"},{"title":"FetchTimingInfo","link":"FetchTimingInfo"},{"title":"FetchTimingInfo#connectEnd","link":"connectEnd","description":"

Gets the timestamp when the connection ended.

"},{"title":"FetchTimingInfo#connectStart","link":"connectStart","description":"

Gets the timestamp when the connection started.

"},{"title":"FetchTimingInfo#dnsEnd","link":"dnsEnd","description":"

Gets the timestamp when the domain lookup ended.

"},{"title":"FetchTimingInfo#dnsStart","link":"dnsStart","description":"

Gets the timestamp when the domain lookup started.

"},{"title":"FetchTimingInfo#fetchStart","link":"fetchStart","description":"

Gets the timestamp when the fetch started.

"},{"title":"FetchTimingInfo#originTime","link":"originTime","description":"

Gets the origin time.

"},{"title":"FetchTimingInfo#redirectEnd","link":"redirectEnd","description":"

Gets the timestamp when the redirect ended.

"},{"title":"FetchTimingInfo#redirectStart","link":"redirectStart","description":"

Gets the timestamp when the redirect started.

"},{"title":"FetchTimingInfo#requestStart","link":"requestStart","description":"

Gets the timestamp when the request started.

"},{"title":"FetchTimingInfo#requestTime","link":"requestTime","description":"

Get the request time.

"},{"title":"FetchTimingInfo#responseEnd","link":"responseEnd","description":"

Gets the timestamp when the response ended.

"},{"title":"FetchTimingInfo#responseStart","link":"responseStart","description":"

Gets the timestamp when the response started.

"},{"title":"FetchTimingInfo#tlsStart","link":"tlsStart","description":"

Gets the timestamp when the secure connection started.

"},{"title":"FileDetector","link":"FileDetector"},{"title":"FileDetector","link":"FileDetector"},{"title":"FileDetector#handleFile","link":"handleFile","description":"

Handles the file specified by the given path, preparing it for use with\nthe current browser. If the path does not refer to a valid file, it will\nbe returned unchanged, otherwise a path suitable for use with the current\nbrowser will be returned.

\n

This default implementation is a no-op. Subtypes may override this function\nfor custom tailored file handling.

"},{"title":"FileDetector#handleFile","link":"handleFile","description":"

Prepares a file for use with the remote browser. If the provided path\ndoes not reference a normal file (i.e. it does not exist or is a\ndirectory), then the promise returned by this method will be resolved with\nthe original file path. Otherwise, this method will upload the file to the\nremote server, which will return the file's path on the remote system so\nit may be referenced in subsequent commands.

"},{"title":"GenericLogEntry","link":"GenericLogEntry","description":"

Creates an instance of GenericLogEntry.

"},{"title":"GenericLogEntry#type","link":"type","description":"

Gets the log type.

"},{"title":"GetBrowserForTests~targetBrowser","link":"targetBrowser"},{"title":"Header","link":"Header","description":"

Creates a new Header instance.

"},{"title":"Header#name","link":"name","description":"

Gets the name of the header.

"},{"title":"Header#value","link":"value","description":"

Gets the value of the header.

"},{"title":"HttpClient","link":"HttpClient"},{"title":"HttpClient#client_options","link":"client_options","description":"

client options, header overrides

"},{"title":"HttpClient#keepAlive","link":"keepAlive","description":"

sets keep-alive for the agent\nsee https://stackoverflow.com/a/58332910

"},{"title":"HttpClient#send","link":"send"},{"title":"HttpResponse","link":"HttpResponse","description":"

Creates a HTTP Response that will be used to\nmock out network interceptions.

"},{"title":"HttpResponse#addHeaders","link":"addHeaders","description":"

Add headers that will be returned when we intercept\na HTTP Request

"},{"title":"HttpResponse#body","link":"body","description":"

Sets the value of the body of the HTTP Request that\nwill be returned.

"},{"title":"HttpResponse#method","link":"method","description":"

Sets the method of the HTTP Request

"},{"title":"HttpResponse#method","link":"method","description":"

Returns the Method to be used in the intercept

"},{"title":"HttpResponse#status","link":"status","description":"

Set the STATUS value of the returned HTTP Request

"},{"title":"INTERNAL_COMPUTE_OFFSET_SCRIPT","link":"INTERNAL_COMPUTE_OFFSET_SCRIPT","description":"

Script used to compute the offset from the center of a DOM element's first\nclient rect from the top-left corner of the element's bounding client rect.\nThe element's center point is computed using the algorithm defined here:\nhttps://w3c.github.io/webdriver/webdriver-spec.html#dfn-center-point.

\n

This is only exported for use in internal unit tests. DO NOT USE.

"},{"title":"ISelect","link":"ISelect"},{"title":"ISelect#deselectAll","link":"deselectAll","description":"

Clear all selected entries. This is only valid when the SELECT supports multiple selections.

"},{"title":"ISelect#deselectByIndex","link":"deselectByIndex","description":"

Deselect the option at the given index. This is done by examining the "index" attribute of an\nelement, and not merely by counting.

"},{"title":"ISelect#deselectByValue","link":"deselectByValue","description":"

Deselect all options that have a value matching the argument. That is, when given "foo" this\nwould deselect an option like:

"},{"title":"ISelect#deselectByVisibleText","link":"deselectByVisibleText","description":"

Deselect all options that display text matching the argument. That is, when given "Bar" this\nwould deselect an option like:

\n

<option value="foo">Bar</option>

"},{"title":"ISelect#getAllSelectedOptions","link":"getAllSelectedOptions"},{"title":"ISelect#getFirstSelectedOption","link":"getFirstSelectedOption"},{"title":"ISelect#getOptions","link":"getOptions"},{"title":"ISelect#isMultiple","link":"isMultiple"},{"title":"ISelect#selectByIndex","link":"selectByIndex","description":"

Select the option at the given index. This is done by examining the "index" attribute of an\nelement, and not merely by counting.

"},{"title":"ISelect#selectByValue","link":"selectByValue","description":"

Select all options that have a value matching the argument. That is, when given "foo" this\nwould select an option like:

\n

<option value="foo">Bar</option>

"},{"title":"ISelect#selectByVisibleText","link":"selectByVisibleText","description":"

Select all options that display text matching the argument. That is, when given "Bar" this\nwould select an option like:

\n

<option value="foo">Bar</option>

"},{"title":"IWebDriver","link":"IWebDriver"},{"title":"IWebDriver#actions","link":"actions","description":"

Creates a new action sequence using this driver. The sequence will not be\nsubmitted for execution until\n{@link ./input.Actions#perform Actions.perform()} is called.

"},{"title":"IWebDriver#close","link":"close","description":"

Closes the current window.

"},{"title":"IWebDriver#execute","link":"execute","description":"

Executes the provided {@link command.Command} using this driver's\n{@link command.Executor}.

"},{"title":"IWebDriver#executeAsyncScript","link":"executeAsyncScript","description":"

Executes a snippet of asynchronous JavaScript in the context of the\ncurrently selected frame or window. The script fragment will be executed as\nthe body of an anonymous function. If the script is provided as a function\nobject, that function will be converted to a string for injection into the\ntarget window.

\n

Any arguments provided in addition to the script will be included as script\narguments and may be referenced using the arguments object. Arguments may\nbe a boolean, number, string, or {@linkplain WebElement}. Arrays and\nobjects may also be used as script arguments as long as each item adheres\nto the types previously mentioned.

\n

Unlike executing synchronous JavaScript with {@link #executeScript},\nscripts executed with this function must explicitly signal they are\nfinished by invoking the provided callback. This callback will always be\ninjected into the executed function as the last argument, and thus may be\nreferenced with arguments[arguments.length - 1]. The following steps\nwill be taken for resolving this functions return value against the first\nargument to the script's callback function:

\n
    \n
  • For a HTML element, the value will resolve to a {@link WebElement}
  • \n
  • Null and undefined return values will resolve to null
  • \n
  • Booleans, numbers, and strings will resolve as is
  • \n
  • Functions will resolve to their string representation
  • \n
  • For arrays and objects, each member item will be converted according to\nthe rules above
  • \n
\n

Example #1: Performing a sleep that is synchronized with the currently\nselected window:

\n
var start = new Date().getTime();\ndriver.executeAsyncScript(\n    'window.setTimeout(arguments[arguments.length - 1], 500);').\n    then(function() {\n      console.log(\n          'Elapsed time: ' + (new Date().getTime() - start) + ' ms');\n    });\n
\n

Example #2: Synchronizing a test with an AJAX application:

\n
var button = driver.findElement(By.id('compose-button'));\nbutton.click();\ndriver.executeAsyncScript(\n    'var callback = arguments[arguments.length - 1];' +\n    'mailClient.getComposeWindowWidget().onload(callback);');\ndriver.switchTo().frame('composeWidget');\ndriver.findElement(By.id('to')).sendKeys('dog@example.com');\n
\n

Example #3: Injecting a XMLHttpRequest and waiting for the result. In\nthis example, the inject script is specified with a function literal. When\nusing this format, the function is converted to a string for injection, so\nit should not reference any symbols not defined in the scope of the page\nunder test.

\n
driver.executeAsyncScript(function() {\n  var callback = arguments[arguments.length - 1];\n  var xhr = new XMLHttpRequest();\n  xhr.open("GET", "/resource/data.json", true);\n  xhr.onreadystatechange = function() {\n    if (xhr.readyState == 4) {\n      callback(xhr.responseText);\n    }\n  };\n  xhr.send('');\n}).then(function(str) {\n  console.log(JSON.parse(str)['food']);\n});\n
"},{"title":"IWebDriver#executeScript","link":"executeScript","description":"

Executes a snippet of JavaScript in the context of the currently selected\nframe or window. The script fragment will be executed as the body of an\nanonymous function. If the script is provided as a function object, that\nfunction will be converted to a string for injection into the target\nwindow.

\n

Any arguments provided in addition to the script will be included as script\narguments and may be referenced using the arguments object. Arguments may\nbe a boolean, number, string, or {@linkplain WebElement}. Arrays and\nobjects may also be used as script arguments as long as each item adheres\nto the types previously mentioned.

\n

The script may refer to any variables accessible from the current window.\nFurthermore, the script will execute in the window's context, thus\ndocument may be used to refer to the current document. Any local\nvariables will not be available once the script has finished executing,\nthough global variables will persist.

\n

If the script has a return value (i.e. if the script contains a return\nstatement), then the following steps will be taken for resolving this\nfunctions return value:

\n
    \n
  • For a HTML element, the value will resolve to a {@linkplain WebElement}
  • \n
  • Null and undefined return values will resolve to null
  • \n
  • Booleans, numbers, and strings will resolve as is
  • \n
  • Functions will resolve to their string representation
  • \n
  • For arrays and objects, each member item will be converted according to\nthe rules above
  • \n
"},{"title":"IWebDriver#findElement","link":"findElement","description":"

Locates an element on the page. If the element cannot be found, a\n{@link error.NoSuchElementError} will be returned by the driver.

\n

This function should not be used to test whether an element is present on\nthe page. Rather, you should use {@link #findElements}:

\n
driver.findElements(By.id('foo'))\n    .then(found => console.log('Element found? %s', !!found.length));\n
\n

The search criteria for an element may be defined using one of the\nfactories in the {@link webdriver.By} namespace, or as a short-hand\n{@link webdriver.By.Hash} object. For example, the following two statements\nare equivalent:

\n
var e1 = driver.findElement(By.id('foo'));\nvar e2 = driver.findElement({id:'foo'});\n
\n

You may also provide a custom locator function, which takes as input this\ninstance and returns a {@link WebElement}, or a promise that will resolve\nto a WebElement. If the returned promise resolves to an array of\nWebElements, WebDriver will use the first element. For example, to find the\nfirst visible link on a page, you could write:

\n
var link = driver.findElement(firstVisibleLink);\n\nfunction firstVisibleLink(driver) {\n  var links = driver.findElements(By.tagName('a'));\n  return promise.filter(links, function(link) {\n    return link.isDisplayed();\n  });\n}\n
"},{"title":"IWebDriver#findElements","link":"findElements","description":"

Search for multiple elements on the page. Refer to the documentation on\n{@link #findElement(by)} for information on element locator strategies.

"},{"title":"IWebDriver#get","link":"get","description":"

Navigates to the given URL.

"},{"title":"IWebDriver#getAllWindowHandles","link":"getAllWindowHandles","description":"

Retrieves a list of all available window handles.

"},{"title":"IWebDriver#getCapabilities","link":"getCapabilities"},{"title":"IWebDriver#getCurrentUrl","link":"getCurrentUrl","description":"

Retrieves the URL for the current page.

"},{"title":"IWebDriver#getExecutor","link":"getExecutor"},{"title":"IWebDriver#getPageSource","link":"getPageSource","description":"

Retrieves the current page's source. The returned source is a representation\nof the underlying DOM: do not expect it to be formatted or escaped in the\nsame way as the raw response sent from the web server.

"},{"title":"IWebDriver#getSession","link":"getSession"},{"title":"IWebDriver#getTitle","link":"getTitle","description":"

Retrieves the current page title.

"},{"title":"IWebDriver#getWindowHandle","link":"getWindowHandle","description":"

Retrieves the current window handle.

"},{"title":"IWebDriver#manage","link":"manage"},{"title":"IWebDriver#navigate","link":"navigate"},{"title":"IWebDriver#printPage","link":"printPage","description":"

Takes a PDF of the current page. The driver makes a best effort to\nreturn a PDF based on the provided parameters.

"},{"title":"IWebDriver#quit","link":"quit","description":"

Terminates the browser session. After calling quit, this instance will be\ninvalidated and may no longer be used to issue commands against the\nbrowser.

"},{"title":"IWebDriver#setFileDetector","link":"setFileDetector","description":"

Sets the {@linkplain input.FileDetector file detector} that should be\nused with this instance.

"},{"title":"IWebDriver#sleep","link":"sleep","description":"

Makes the driver sleep for the given amount of time.

"},{"title":"IWebDriver#switchTo","link":"switchTo"},{"title":"IWebDriver#takeScreenshot","link":"takeScreenshot","description":"

Takes a screenshot of the current page. The driver makes the best effort to\nreturn a screenshot of the following, in order of preference:

\n
    \n
  1. Entire page
  2. \n
  3. Current window
  4. \n
  5. Visible portion of the current frame
  6. \n
  7. The entire display containing the browser
  8. \n
"},{"title":"IWebDriver#wait","link":"wait","description":"

Waits for a condition to evaluate to a "truthy" value. The condition may be\nspecified by a {@link Condition}, as a custom function, or as any\npromise-like thenable.

\n

For a {@link Condition} or function, the wait will repeatedly\nevaluate the condition until it returns a truthy value. If any errors occur\nwhile evaluating the condition, they will be allowed to propagate. In the\nevent a condition returns a {@linkplain Promise}, the polling loop will\nwait for it to be resolved and use the resolved value for whether the\ncondition has been satisfied. The resolution time for a promise is always\nfactored into whether a wait has timed out.

\n

If the provided condition is a {@link WebElementCondition}, then\nthe wait will return a {@link WebElementPromise} that will resolve to the\nelement that satisfied the condition.

\n

Example: waiting up to 10 seconds for an element to be present on the\npage.

\n
async function example() {\n  let button =\n      await driver.wait(until.elementLocated(By.id('foo')), 10000);\n  await button.click();\n}\n
"},{"title":"Index","link":"Index","description":"

Create a new websocket connection

"},{"title":"Index#close","link":"close","description":"

Close ws connection.

"},{"title":"Index#isConnected","link":"isConnected"},{"title":"Index#send","link":"send","description":"

Sends a bidi request

"},{"title":"Index#socket","link":"socket"},{"title":"Index#status","link":"status","description":"

Get Bidi Status

"},{"title":"Index#subscribe","link":"subscribe","description":"

Subscribe to events

"},{"title":"Index#unsubscribe","link":"unsubscribe","description":"

Unsubscribe to events

"},{"title":"Index#waitForConnection","link":"waitForConnection","description":"

Resolve connection

"},{"title":"Initiator","link":"Initiator","description":"

Constructs a new Initiator instance.

"},{"title":"Initiator#columnNumber","link":"columnNumber","description":"

Gets the column number.

"},{"title":"Initiator#lineNumber","link":"lineNumber","description":"

Gets the line number.

"},{"title":"Initiator#request","link":"request","description":"

Gets the request ID.

"},{"title":"Initiator#stackTrace","link":"stackTrace","description":"

Gets the stack trace.

"},{"title":"Initiator#type","link":"type","description":"

Gets the type of the initiator.

"},{"title":"Input","link":"Input"},{"title":"Input#perform","link":"perform","description":"

Performs the specified actions on the given browsing context.

"},{"title":"Input#release","link":"release","description":"

Resets the input state in the specified browsing context.

"},{"title":"Input#setFiles","link":"setFiles","description":"

Sets the files property of a given input element.

"},{"title":"InsecureCertificateError","link":"InsecureCertificateError"},{"title":"InterceptPhase","link":"InterceptPhase","description":"

Represents the different phases of intercepting network requests and responses.

"},{"title":"InterceptPhase.AUTH_REQUIRED","link":"AUTH_REQUIRED"},{"title":"InterceptPhase.BEFORE_REQUEST_SENT","link":"BEFORE_REQUEST_SENT"},{"title":"InterceptPhase.RESPONSE_STARTED","link":"RESPONSE_STARTED"},{"title":"InvalidArgumentError","link":"InvalidArgumentError"},{"title":"InvalidCharacterError","link":"InvalidCharacterError"},{"title":"InvalidCookieDomainError","link":"InvalidCookieDomainError"},{"title":"InvalidCoordinatesError","link":"InvalidCoordinatesError"},{"title":"InvalidElementStateError","link":"InvalidElementStateError"},{"title":"InvalidSelectorError","link":"InvalidSelectorError"},{"title":"JavascriptError","link":"JavascriptError"},{"title":"JavascriptLogEntry","link":"JavascriptLogEntry"},{"title":"Key","link":"Key","description":"

Representations of pressable keys that aren't text. These are stored in\nthe Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to\nhttp://www.google.com.au/search?&q=unicode+pua&btnK=Search

"},{"title":"Key.ADD","link":"ADD"},{"title":"Key.ALT","link":"ALT"},{"title":"Key.ARROW_DOWN","link":"ARROW_DOWN"},{"title":"Key.ARROW_LEFT","link":"ARROW_LEFT"},{"title":"Key.ARROW_RIGHT","link":"ARROW_RIGHT"},{"title":"Key.ARROW_UP","link":"ARROW_UP"},{"title":"Key.BACK_SPACE","link":"BACK_SPACE"},{"title":"Key.CANCEL","link":"CANCEL"},{"title":"Key.CLEAR","link":"CLEAR"},{"title":"Key.COMMAND","link":"COMMAND"},{"title":"Key.CONTROL","link":"CONTROL"},{"title":"Key.DECIMAL","link":"DECIMAL"},{"title":"Key.DELETE","link":"DELETE"},{"title":"Key.DIVIDE","link":"DIVIDE"},{"title":"Key.DOWN","link":"DOWN"},{"title":"Key.END","link":"END"},{"title":"Key.ENTER","link":"ENTER"},{"title":"Key.EQUALS","link":"EQUALS"},{"title":"Key.ESCAPE","link":"ESCAPE"},{"title":"Key.F1","link":"F1"},{"title":"Key.F10","link":"F10"},{"title":"Key.F11","link":"F11"},{"title":"Key.F12","link":"F12"},{"title":"Key.F2","link":"F2"},{"title":"Key.F3","link":"F3"},{"title":"Key.F4","link":"F4"},{"title":"Key.F5","link":"F5"},{"title":"Key.F6","link":"F6"},{"title":"Key.F7","link":"F7"},{"title":"Key.F8","link":"F8"},{"title":"Key.F9","link":"F9"},{"title":"Key.HELP","link":"HELP"},{"title":"Key.HOME","link":"HOME"},{"title":"Key.INSERT","link":"INSERT"},{"title":"Key.LEFT","link":"LEFT"},{"title":"Key.META","link":"META"},{"title":"Key.MULTIPLY","link":"MULTIPLY"},{"title":"Key.NULL","link":"NULL"},{"title":"Key.NUMPAD0","link":"NUMPAD0"},{"title":"Key.NUMPAD1","link":"NUMPAD1"},{"title":"Key.NUMPAD2","link":"NUMPAD2"},{"title":"Key.NUMPAD3","link":"NUMPAD3"},{"title":"Key.NUMPAD4","link":"NUMPAD4"},{"title":"Key.NUMPAD5","link":"NUMPAD5"},{"title":"Key.NUMPAD6","link":"NUMPAD6"},{"title":"Key.NUMPAD7","link":"NUMPAD7"},{"title":"Key.NUMPAD8","link":"NUMPAD8"},{"title":"Key.NUMPAD9","link":"NUMPAD9"},{"title":"Key.PAGE_DOWN","link":"PAGE_DOWN"},{"title":"Key.PAGE_UP","link":"PAGE_UP"},{"title":"Key.PAUSE","link":"PAUSE"},{"title":"Key.RETURN","link":"RETURN"},{"title":"Key.RIGHT","link":"RIGHT"},{"title":"Key.SEMICOLON","link":"SEMICOLON"},{"title":"Key.SEPARATOR","link":"SEPARATOR"},{"title":"Key.SHIFT","link":"SHIFT"},{"title":"Key.SPACE","link":"SPACE"},{"title":"Key.SUBTRACT","link":"SUBTRACT"},{"title":"Key.TAB","link":"TAB"},{"title":"Key.UP","link":"UP"},{"title":"Key.ZENKAKU_HANKAKU","link":"ZENKAKU_HANKAKU","description":"

Japanese modifier key for switching between full- and half-width\ncharacters.

"},{"title":"Key.chord","link":"chord","description":"

Simulate pressing many keys at once in a "chord". Takes a sequence of\n{@linkplain Key keys} or strings, appends each of the values to a string,\nadds the chord termination key ({@link Key.NULL}) and returns the resulting\nstring.

\n

Note: when the low-level webdriver key handlers see Keys.NULL, active\nmodifier keys (CTRL/ALT/SHIFT/etc) release via a keyup event.

"},{"title":"Keyboard","link":"Keyboard"},{"title":"Keyboard#keyDown","link":"keyDown","description":"

Generates a key down action.

"},{"title":"Keyboard#keyUp","link":"keyUp","description":"

Generates a key up action.

"},{"title":"Level","link":"Level"},{"title":"Level#name","link":"name","description":"

This logger's name.

"},{"title":"Level#toString","link":"toString"},{"title":"Level#value","link":"value","description":"

The numeric log level.

"},{"title":"Level.ALL","link":"ALL","description":"

Indicates all log messages should be recorded.

"},{"title":"Level.DEBUG","link":"DEBUG","description":"

Log messages with a level of 700 or higher.

"},{"title":"Level.FINE","link":"FINE","description":"

Log messages with a level of 500 or higher.

"},{"title":"Level.FINER","link":"FINER","description":"

Log messages with a level of 400 or higher.

"},{"title":"Level.FINEST","link":"FINEST","description":"

Log messages with a level of 300 or higher.

"},{"title":"Level.INFO","link":"INFO","description":"

Log messages with a level of 800 or higher.

"},{"title":"Level.OFF","link":"OFF","description":"

Indicates no log messages should be recorded.

"},{"title":"Level.SEVERE","link":"SEVERE","description":"

Log messages with a level of 1000 or higher.

"},{"title":"Level.WARNING","link":"WARNING","description":"

Log messages with a level of 900 or higher.

"},{"title":"LocalValue","link":"LocalValue"},{"title":"LocalValue.createArrayValue","link":"createArrayValue","description":"

Creates a new LocalValue object with an array.

"},{"title":"LocalValue.createBigIntValue","link":"createBigIntValue","description":"

Creates a new LocalValue object with a BigInt value.

"},{"title":"LocalValue.createBooleanValue","link":"createBooleanValue","description":"

Creates a new LocalValue object with a boolean value.

"},{"title":"LocalValue.createChannelValue","link":"createChannelValue","description":"

Creates a new LocalValue object with the given channel value

"},{"title":"LocalValue.createDateValue","link":"createDateValue","description":"

Creates a new LocalValue object with date value.

"},{"title":"LocalValue.createMapValue","link":"createMapValue","description":"

Creates a new LocalValue object of map value.

"},{"title":"LocalValue.createNullValue","link":"createNullValue","description":"

Creates a new LocalValue object with a null value.

"},{"title":"LocalValue.createNumberValue","link":"createNumberValue","description":"

Creates a new LocalValue object with a number value.

"},{"title":"LocalValue.createObjectValue","link":"createObjectValue","description":"

Creates a new LocalValue object from the passed object.

"},{"title":"LocalValue.createRegularExpressionValue","link":"createRegularExpressionValue","description":"

Creates a new LocalValue object of regular expression value.

"},{"title":"LocalValue.createSetValue","link":"createSetValue","description":"

Creates a new LocalValue object with the specified value.

"},{"title":"LocalValue.createSpecialNumberValue","link":"createSpecialNumberValue","description":"

Creates a new LocalValue object with a special number value.

"},{"title":"LocalValue.createStringValue","link":"createStringValue","description":"

Creates a new LocalValue object with a string value.

"},{"title":"LocalValue.createUndefinedValue","link":"createUndefinedValue","description":"

Creates a new LocalValue object with an undefined value.

"},{"title":"Locator","link":"Locator"},{"title":"Locator.css","link":"css","description":"

Creates a new Locator object with CSS selector type.

"},{"title":"Locator.innerText","link":"innerText","description":"

Creates a new Locator object with the specified inner text value.

"},{"title":"Locator.xpath","link":"xpath","description":"

Creates a new Locator object with the given XPath value.

"},{"title":"LogInspector#close","link":"close","description":"

Unsubscribe to log event

"},{"title":"LogInspector#init","link":"init","description":"

Subscribe to log event

"},{"title":"LogInspector#onConsoleEntry","link":"onConsoleEntry","description":"

Listen to Console logs

"},{"title":"LogInspector#onJavascriptException","link":"onJavascriptException","description":"

Listen to JS Exceptions

"},{"title":"LogInspector#onJavascriptLog","link":"onJavascriptLog","description":"

Listen to JS logs

"},{"title":"LogInspector#onLog","link":"onLog","description":"

Listen to any logs

"},{"title":"LogManager","link":"LogManager"},{"title":"LogManager#getLogger","link":"getLogger","description":"

Retrieves a named logger, creating it in the process. This function will\nimplicitly create the requested logger, and any of its parents, if they\ndo not yet exist.

"},{"title":"Logger","link":"Logger"},{"title":"Logger#addHandler","link":"addHandler","description":"

Adds a handler to this logger. The handler will be invoked for each message\nlogged with this instance, or any of its descendants.

"},{"title":"Logger#debug","link":"debug","description":"

Logs a message at the {@link Level.DEBUG} log level.

"},{"title":"Logger#fine","link":"fine","description":"

Logs a message at the {@link Level.FINE} log level.

"},{"title":"Logger#finer","link":"finer","description":"

Logs a message at the {@link Level.FINER} log level.

"},{"title":"Logger#finest","link":"finest","description":"

Logs a message at the {@link Level.FINEST} log level.

"},{"title":"Logger#getEffectiveLevel","link":"getEffectiveLevel"},{"title":"Logger#getLevel","link":"getLevel"},{"title":"Logger#getName","link":"getName"},{"title":"Logger#info","link":"info","description":"

Logs a message at the {@link Level.INFO} log level.

"},{"title":"Logger#isLoggable","link":"isLoggable"},{"title":"Logger#log","link":"log","description":"

Logs a message at the given level. The message may be defined as a string\nor as a function that will return the message. If a function is provided,\nit will only be invoked if this logger's\n{@linkplain #getEffectiveLevel() effective log level} includes the given\nlevel.

"},{"title":"Logger#removeHandler","link":"removeHandler","description":"

Removes a handler from this logger.

"},{"title":"Logger#setLevel","link":"setLevel"},{"title":"Logger#severe","link":"severe","description":"

Logs a message at the {@link Level.SEVERE} log level.

"},{"title":"Logger#warning","link":"warning","description":"

Logs a message at the {@link Level.WARNING} log level.

"},{"title":"Logs#get","link":"get","description":"

Fetches available log entries for the given type.

\n

Note that log buffers are reset after each call, meaning that available\nlog entries correspond to those entries not yet returned for a given log\ntype. In practice, this means that this call will return the available log\nentries since the last call, or from the start of the session.

"},{"title":"Logs#getAvailableLogTypes","link":"getAvailableLogTypes","description":"

Retrieves the log types available to this driver.

"},{"title":"ManualConfig","link":"ManualConfig","description":"

Record object that defines a manual proxy configuration. Manual\nconfigurations can be easily created using either the\n{@link ./proxy.manual proxy.manual()} or {@link ./proxy.socks proxy.socks()}\nfactory method.

"},{"title":"ManualConfig","link":"ManualConfig"},{"title":"ManualConfig#ftpProxy","link":"ftpProxy","description":"

The proxy host for FTP requests.

"},{"title":"ManualConfig#httpProxy","link":"httpProxy","description":"

The proxy host for HTTP requests.

"},{"title":"ManualConfig#noProxy","link":"noProxy","description":"

An array of hosts which should bypass all proxies.

"},{"title":"ManualConfig#socksProxy","link":"socksProxy","description":"

Defines the host and port for the SOCKS proxy to use.

"},{"title":"ManualConfig#socksVersion","link":"socksVersion","description":"

Defines the SOCKS proxy version. Must be a number in the range [0, 255].

"},{"title":"ManualConfig#sslProxy","link":"sslProxy","description":"

The proxy host for HTTPS requests.

"},{"title":"Message","link":"Message","description":"

Creates a new Message instance.

"},{"title":"Message#channel","link":"channel","description":"

Gets the channel through which the message is received.

"},{"title":"Message#data","link":"data","description":"

Gets the data contained in the message.

"},{"title":"Message#source","link":"source","description":"

Gets the source of the message.

"},{"title":"MoveTargetOutOfBoundsError","link":"MoveTargetOutOfBoundsError"},{"title":"Name","link":"Name","description":"

Enumeration of predefined names command names that all command processors\nwill support.

"},{"title":"Name.ACCEPT_ALERT","link":"ACCEPT_ALERT"},{"title":"Name.ACTIONS","link":"ACTIONS"},{"title":"Name.ADD_COOKIE","link":"ADD_COOKIE"},{"title":"Name.ADD_CREDENTIAL","link":"ADD_CREDENTIAL"},{"title":"Name.ADD_VIRTUAL_AUTHENTICATOR","link":"ADD_VIRTUAL_AUTHENTICATOR"},{"title":"Name.CANCEL_DIALOG","link":"CANCEL_DIALOG"},{"title":"Name.CLEAR_ACTIONS","link":"CLEAR_ACTIONS"},{"title":"Name.CLEAR_ELEMENT","link":"CLEAR_ELEMENT"},{"title":"Name.CLICK_DIALOG_BUTTON","link":"CLICK_DIALOG_BUTTON"},{"title":"Name.CLICK_ELEMENT","link":"CLICK_ELEMENT"},{"title":"Name.CLOSE","link":"CLOSE"},{"title":"Name.DELETE_ALL_COOKIES","link":"DELETE_ALL_COOKIES"},{"title":"Name.DELETE_COOKIE","link":"DELETE_COOKIE"},{"title":"Name.DELETE_DOWNLOADABLE_FILES","link":"DELETE_DOWNLOADABLE_FILES"},{"title":"Name.DISMISS_ALERT","link":"DISMISS_ALERT"},{"title":"Name.DOWNLOAD_FILE","link":"DOWNLOAD_FILE"},{"title":"Name.EXECUTE_ASYNC_SCRIPT","link":"EXECUTE_ASYNC_SCRIPT"},{"title":"Name.EXECUTE_SCRIPT","link":"EXECUTE_SCRIPT"},{"title":"Name.FIND_CHILD_ELEMENT","link":"FIND_CHILD_ELEMENT"},{"title":"Name.FIND_CHILD_ELEMENTS","link":"FIND_CHILD_ELEMENTS"},{"title":"Name.FIND_ELEMENT","link":"FIND_ELEMENT"},{"title":"Name.FIND_ELEMENTS","link":"FIND_ELEMENTS"},{"title":"Name.FIND_ELEMENTS_FROM_SHADOWROOT","link":"FIND_ELEMENTS_FROM_SHADOWROOT"},{"title":"Name.FIND_ELEMENTS_RELATIVE","link":"FIND_ELEMENTS_RELATIVE"},{"title":"Name.FIND_ELEMENT_FROM_SHADOWROOT","link":"FIND_ELEMENT_FROM_SHADOWROOT"},{"title":"Name.FULLSCREEN_WINDOW","link":"FULLSCREEN_WINDOW"},{"title":"Name.GET","link":"GET"},{"title":"Name.GET_ACCOUNTS","link":"GET_ACCOUNTS"},{"title":"Name.GET_ACTIVE_ELEMENT","link":"GET_ACTIVE_ELEMENT"},{"title":"Name.GET_ALERT_TEXT","link":"GET_ALERT_TEXT"},{"title":"Name.GET_ALL_COOKIES","link":"GET_ALL_COOKIES"},{"title":"Name.GET_AVAILABLE_LOG_TYPES","link":"GET_AVAILABLE_LOG_TYPES"},{"title":"Name.GET_COMPUTED_LABEL","link":"GET_COMPUTED_LABEL"},{"title":"Name.GET_COMPUTED_ROLE","link":"GET_COMPUTED_ROLE"},{"title":"Name.GET_COOKIE","link":"GET_COOKIE"},{"title":"Name.GET_CREDENTIALS","link":"GET_CREDENTIALS"},{"title":"Name.GET_CURRENT_URL","link":"GET_CURRENT_URL"},{"title":"Name.GET_CURRENT_WINDOW_HANDLE","link":"GET_CURRENT_WINDOW_HANDLE"},{"title":"Name.GET_DOM_ATTRIBUTE","link":"GET_DOM_ATTRIBUTE"},{"title":"Name.GET_DOWNLOADABLE_FILES","link":"GET_DOWNLOADABLE_FILES"},{"title":"Name.GET_ELEMENT_ATTRIBUTE","link":"GET_ELEMENT_ATTRIBUTE"},{"title":"Name.GET_ELEMENT_PROPERTY","link":"GET_ELEMENT_PROPERTY"},{"title":"Name.GET_ELEMENT_RECT","link":"GET_ELEMENT_RECT"},{"title":"Name.GET_ELEMENT_TAG_NAME","link":"GET_ELEMENT_TAG_NAME"},{"title":"Name.GET_ELEMENT_TEXT","link":"GET_ELEMENT_TEXT"},{"title":"Name.GET_ELEMENT_VALUE_OF_CSS_PROPERTY","link":"GET_ELEMENT_VALUE_OF_CSS_PROPERTY"},{"title":"Name.GET_FEDCM_DIALOG_TYPE","link":"GET_FEDCM_DIALOG_TYPE"},{"title":"Name.GET_FEDCM_TITLE","link":"GET_FEDCM_TITLE"},{"title":"Name.GET_LOG","link":"GET_LOG"},{"title":"Name.GET_PAGE_SOURCE","link":"GET_PAGE_SOURCE"},{"title":"Name.GET_SERVER_STATUS","link":"GET_SERVER_STATUS"},{"title":"Name.GET_SESSIONS","link":"GET_SESSIONS"},{"title":"Name.GET_SHADOW_ROOT","link":"GET_SHADOW_ROOT"},{"title":"Name.GET_TIMEOUT","link":"GET_TIMEOUT"},{"title":"Name.GET_TITLE","link":"GET_TITLE"},{"title":"Name.GET_WINDOW_HANDLES","link":"GET_WINDOW_HANDLES"},{"title":"Name.GET_WINDOW_RECT","link":"GET_WINDOW_RECT"},{"title":"Name.GO_BACK","link":"GO_BACK"},{"title":"Name.GO_FORWARD","link":"GO_FORWARD"},{"title":"Name.IS_ELEMENT_DISPLAYED","link":"IS_ELEMENT_DISPLAYED"},{"title":"Name.IS_ELEMENT_ENABLED","link":"IS_ELEMENT_ENABLED"},{"title":"Name.IS_ELEMENT_SELECTED","link":"IS_ELEMENT_SELECTED"},{"title":"Name.MAXIMIZE_WINDOW","link":"MAXIMIZE_WINDOW"},{"title":"Name.MINIMIZE_WINDOW","link":"MINIMIZE_WINDOW"},{"title":"Name.NEW_SESSION","link":"NEW_SESSION"},{"title":"Name.PRINT_PAGE","link":"PRINT_PAGE"},{"title":"Name.QUIT","link":"QUIT"},{"title":"Name.REFRESH","link":"REFRESH"},{"title":"Name.REMOVE_ALL_CREDENTIALS","link":"REMOVE_ALL_CREDENTIALS"},{"title":"Name.REMOVE_CREDENTIAL","link":"REMOVE_CREDENTIAL"},{"title":"Name.REMOVE_VIRTUAL_AUTHENTICATOR","link":"REMOVE_VIRTUAL_AUTHENTICATOR"},{"title":"Name.RESET_COOLDOWN","link":"RESET_COOLDOWN"},{"title":"Name.SCREENSHOT","link":"SCREENSHOT"},{"title":"Name.SELECT_ACCOUNT","link":"SELECT_ACCOUNT"},{"title":"Name.SEND_KEYS_TO_ELEMENT","link":"SEND_KEYS_TO_ELEMENT"},{"title":"Name.SET_ALERT_TEXT","link":"SET_ALERT_TEXT"},{"title":"Name.SET_DELAY_ENABLED","link":"SET_DELAY_ENABLED"},{"title":"Name.SET_TIMEOUT","link":"SET_TIMEOUT"},{"title":"Name.SET_USER_VERIFIED","link":"SET_USER_VERIFIED"},{"title":"Name.SET_WINDOW_RECT","link":"SET_WINDOW_RECT"},{"title":"Name.SWITCH_TO_FRAME","link":"SWITCH_TO_FRAME"},{"title":"Name.SWITCH_TO_FRAME_PARENT","link":"SWITCH_TO_FRAME_PARENT"},{"title":"Name.SWITCH_TO_NEW_WINDOW","link":"SWITCH_TO_NEW_WINDOW"},{"title":"Name.SWITCH_TO_WINDOW","link":"SWITCH_TO_WINDOW"},{"title":"Name.TAKE_ELEMENT_SCREENSHOT","link":"TAKE_ELEMENT_SCREENSHOT"},{"title":"Name.UPLOAD_FILE","link":"UPLOAD_FILE"},{"title":"NavigateResult","link":"NavigateResult"},{"title":"NavigateResult#navigationId","link":"navigationId","description":"

Gets the ID of the navigation operation.

"},{"title":"NavigateResult#url","link":"url","description":"

Gets the URL of the navigated page.

"},{"title":"Navigation#back","link":"back","description":"

Moves backwards in the browser history.

"},{"title":"Navigation#forward","link":"forward","description":"

Moves forwards in the browser history.

"},{"title":"Navigation#refresh","link":"refresh","description":"

Refreshes the current page.

"},{"title":"Navigation#to","link":"to","description":"

Navigates to a new URL.

"},{"title":"NavigationInfo","link":"NavigationInfo","description":"

Constructs a new NavigationInfo object.

"},{"title":"Network","link":"Network","description":"

Represents a Network object.

"},{"title":"Network#addIntercept","link":"addIntercept","description":"

Adds a network intercept.

"},{"title":"Network#authRequired","link":"authRequired","description":"

Subscribes to the 'network.authRequired' event and handles it with the provided callback.

"},{"title":"Network#beforeRequestSent","link":"beforeRequestSent","description":"

Subscribes to the 'network.beforeRequestSent' event and handles it with the provided callback.

"},{"title":"Network#cancelAuth","link":"cancelAuth","description":"

Cancels the authentication for a specific request.

"},{"title":"Network#close","link":"close","description":"

Unsubscribes from network events for all browsing contexts.

"},{"title":"Network#continueRequest","link":"continueRequest","description":"

Continues the network request with the provided parameters.

"},{"title":"Network#continueResponse","link":"continueResponse","description":"

Continues the network response with the given parameters.

"},{"title":"Network#continueWithAuth","link":"continueWithAuth","description":"

Continues the network request with authentication credentials.

"},{"title":"Network#continueWithAuthNoCredentials","link":"continueWithAuthNoCredentials","description":"

Continues the network request with authentication but without providing credentials.

"},{"title":"Network#failRequest","link":"failRequest","description":"

Fails a network request.

"},{"title":"Network#fetchError","link":"fetchError","description":"

Subscribes to the 'network.fetchError' event and handles it with the provided callback.

"},{"title":"Network#provideResponse","link":"provideResponse","description":"

Provides a response for the network.

"},{"title":"Network#removeIntercept","link":"removeIntercept","description":"

Removes an intercept.

"},{"title":"Network#responseCompleted","link":"responseCompleted","description":"

Subscribes to the 'network.responseCompleted' event and handles it with the provided callback.

"},{"title":"Network#responseStarted","link":"responseStarted","description":"

Subscribes to the 'network.responseStarted' event and handles it with the provided callback.

"},{"title":"Network#setCacheBehavior","link":"setCacheBehavior","description":"

Sets the cache behavior for network requests.

"},{"title":"NetworkInspector","link":"NetworkInspector"},{"title":"NoSuchAlertError","link":"NoSuchAlertError"},{"title":"NoSuchCookieError","link":"NoSuchCookieError"},{"title":"NoSuchElementError","link":"NoSuchElementError"},{"title":"NoSuchFrameError","link":"NoSuchFrameError"},{"title":"NoSuchSessionError","link":"NoSuchSessionError"},{"title":"NoSuchShadowRootError","link":"NoSuchShadowRootError"},{"title":"NoSuchWindowError","link":"NoSuchWindowError"},{"title":"NonPrimitiveType","link":"NonPrimitiveType","description":"

Represents a non-primitive type.

"},{"title":"NonPrimitiveType.ARRAY","link":"ARRAY"},{"title":"NonPrimitiveType.CHANNEL","link":"CHANNEL"},{"title":"NonPrimitiveType.DATE","link":"DATE"},{"title":"NonPrimitiveType.MAP","link":"MAP"},{"title":"NonPrimitiveType.OBJECT","link":"OBJECT"},{"title":"NonPrimitiveType.REGULAR_EXPRESSION","link":"REGULAR_EXPRESSION"},{"title":"NonPrimitiveType.SET","link":"SET"},{"title":"NonPrimitiveType.findByName","link":"findByName"},{"title":"Options","link":"Options"},{"title":"Options#addCookie","link":"addCookie","description":"

Adds a cookie.

\n

Sample Usage:

\n
// Set a basic cookie.\ndriver.manage().addCookie({name: 'foo', value: 'bar'});\n\n// Set a cookie that expires in 10 minutes.\nlet expiry = new Date(Date.now() + (10 * 60 * 1000));\ndriver.manage().addCookie({name: 'foo', value: 'bar', expiry});\n\n// The cookie expiration may also be specified in seconds since epoch.\ndriver.manage().addCookie({\n  name: 'foo',\n  value: 'bar',\n  expiry: Math.floor(Date.now() / 1000)\n});\n
"},{"title":"Options#args","link":"args","description":"

Command line arguments for the child process, if any.

"},{"title":"Options#deleteAllCookies","link":"deleteAllCookies","description":"

Deletes all cookies visible to the current page.

"},{"title":"Options#deleteCookie","link":"deleteCookie","description":"

Deletes the cookie with the given name. This command is a no-op if there is\nno cookie with the given name visible to the current page.

"},{"title":"Options#env","link":"env","description":"

Environment variables for the spawned process. If unspecified, the\nchild will inherit this process' environment.

"},{"title":"Options#getCookie","link":"getCookie","description":"

Retrieves the cookie with the given name. Returns null if there is no such\ncookie. The cookie will be returned as a JSON object as described by the\nWebDriver wire protocol.

"},{"title":"Options#getCookies","link":"getCookies","description":"

Retrieves all cookies visible to the current page. Each cookie will be\nreturned as a JSON object as described by the WebDriver wire protocol.

"},{"title":"Options#getTimeouts","link":"getTimeouts","description":"

Fetches the timeouts currently configured for the current session.

"},{"title":"Options#logs","link":"logs"},{"title":"Options#setTimeouts","link":"setTimeouts","description":"

Sets the timeout durations associated with the current session.

\n

The following timeouts are supported (all timeouts are specified in\nmilliseconds):

\n
    \n
  • \n

    implicit specifies the maximum amount of time to wait for an element\nlocator to succeed when {@linkplain WebDriver#findElement locating}\n{@linkplain WebDriver#findElements elements} on the page.\nDefaults to 0 milliseconds.

    \n
  • \n
  • \n

    pageLoad specifies the maximum amount of time to wait for a page to\nfinishing loading. Defaults to 300000 milliseconds.

    \n
  • \n
  • \n

    script specifies the maximum amount of time to wait for an\n{@linkplain WebDriver#executeScript evaluated script} to run. If set to\nnull, the script timeout will be indefinite.\nDefaults to 30000 milliseconds.

    \n
  • \n
"},{"title":"Options#stdio","link":"stdio","description":"

IO conifguration for the spawned server child process. If unspecified,\nthe child process' IO output will be ignored.

"},{"title":"Options#window","link":"window"},{"title":"Options.Cookie","link":"Cookie","description":"

A record object describing a browser cookie.

"},{"title":"Options.Cookie#domain","link":"domain","description":"

The domain the cookie is visible to. Defaults to the current browsing\ncontext's document's URL when adding a cookie.

"},{"title":"Options.Cookie#expiry","link":"expiry","description":"

When the cookie expires.

\n

When {@linkplain Options#addCookie() adding a cookie}, this may be specified\nas a {@link Date} object, or in seconds since Unix epoch (January 1, 1970).

\n

The expiry is always returned in seconds since epoch when\n{@linkplain Options#getCookies() retrieving cookies} from the browser.

"},{"title":"Options.Cookie#httpOnly","link":"httpOnly","description":"

Whether the cookie is an HTTP only cookie. Defaults to false when adding a\nnew cookie.

"},{"title":"Options.Cookie#name","link":"name","description":"

The name of the cookie.

"},{"title":"Options.Cookie#path","link":"path","description":"

The cookie path. Defaults to "/" when adding a cookie.

"},{"title":"Options.Cookie#sameSite","link":"sameSite","description":"

When the cookie applies to a SameSite policy.

\n

When {@linkplain Options#addCookie() adding a cookie}, this may be specified\nas a {@link string} object which is one of 'Lax', 'Strict' or 'None'.

"},{"title":"Options.Cookie#secure","link":"secure","description":"

Whether the cookie is a secure cookie. Defaults to false when adding a new\ncookie.

"},{"title":"Options.Cookie#value","link":"value","description":"

The cookie value.

"},{"title":"Origin","link":"Origin","description":"

Defines the reference point from which to compute offsets for capturing screenshot.

"},{"title":"Origin","link":"Origin","description":"

Defines the reference point from which to compute offsets for\n{@linkplain ./input.Pointer#move pointer move} actions.

"},{"title":"Origin.DOCUMENT","link":"DOCUMENT"},{"title":"Origin.POINTER","link":"POINTER","description":"

Compute offsets relative to the pointer's current position.

"},{"title":"Origin.VIEWPORT","link":"VIEWPORT"},{"title":"Origin.VIEWPORT","link":"VIEWPORT","description":"

Compute offsets relative to the viewport.

"},{"title":"PacConfig","link":"PacConfig","description":"

Describes how to configure a PAC proxy.

"},{"title":"PacConfig","link":"PacConfig"},{"title":"PacConfig#proxyAutoconfigUrl","link":"proxyAutoconfigUrl","description":"

URL for the PAC file to use.

"},{"title":"PageLoadStrategy","link":"PageLoadStrategy","description":"

Strategies for waiting for document readiness after a navigation\nevent.

"},{"title":"PageLoadStrategy.EAGER","link":"EAGER","description":"

Indicates WebDriver should wait for the document readiness state to\nbecome "interactive" after navigation.

"},{"title":"PageLoadStrategy.NONE","link":"NONE","description":"

Indicates WebDriver should not wait on the document readiness state after a\nnavigation event.

"},{"title":"PageLoadStrategy.NORMAL","link":"NORMAL","description":"

Indicates WebDriver should wait for the document readiness state to\nbe "complete" after navigation. This is the default page loading strategy.

"},{"title":"PartialCookie","link":"PartialCookie","description":"

Represents a partial cookie.

"},{"title":"PartialCookie#expiry","link":"expiry","description":"

Sets the expiry for the cookie.

"},{"title":"PartialCookie#httpOnly","link":"httpOnly","description":"

Sets the httpOnly flag for the cookie.

"},{"title":"PartialCookie#path","link":"path","description":"

Sets the path for the cookie.

"},{"title":"PartialCookie#sameSite","link":"sameSite","description":"

Sets the SameSite attribute for the cookie.

"},{"title":"PartialCookie#secure","link":"secure","description":"

Sets the secure flag for the cookie.

"},{"title":"PartialCookie#size","link":"size","description":"

Sets the size of the cookie.

"},{"title":"PartitionDescriptor","link":"PartitionDescriptor","description":"

Constructs a new PartitionDescriptor instance.

"},{"title":"PartitionKey","link":"PartitionKey","description":"

Constructs a new PartitionKey object.

"},{"title":"PartitionKey#sourceOrigin","link":"sourceOrigin","description":"

Gets the source origin.

"},{"title":"PartitionKey#userContext","link":"userContext","description":"

Gets the user context.

"},{"title":"Permission#setPermission","link":"setPermission","description":"

Sets a permission state for a given permission descriptor.

"},{"title":"Platform","link":"Platform","description":"

Common platform names. These platforms are not explicitly defined by the\nWebDriver spec, however, their use is encouraged for interoperability.

"},{"title":"Platform.LINUX","link":"LINUX"},{"title":"Platform.MAC","link":"MAC"},{"title":"Platform.WINDOWS","link":"WINDOWS"},{"title":"Pointer","link":"Pointer"},{"title":"Pointer#cancel","link":"cancel"},{"title":"Pointer#move","link":"move","description":"

Creates an action for moving the pointer x and y pixels from the\nspecified origin. The origin may be defined as the pointer's\n{@linkplain Origin.POINTER current position}, the\n{@linkplain Origin.VIEWPORT viewport}, or the center of a specific\n{@linkplain ./webdriver.WebElement WebElement}.

"},{"title":"Pointer#press","link":"press"},{"title":"Pointer#release","link":"release"},{"title":"Pointer#toJSON","link":"toJSON"},{"title":"Pointer.Type","link":"Type","description":"

The supported types of pointers.

"},{"title":"Pointer.Type.MOUSE","link":"MOUSE"},{"title":"Pointer.Type.PEN","link":"PEN"},{"title":"Pointer.Type.TOUCH","link":"TOUCH"},{"title":"Preferences","link":"Preferences"},{"title":"Preferences#setLevel","link":"setLevel","description":"

Sets the desired logging level for a particular log type.

"},{"title":"Preferences#toJSON","link":"toJSON","description":"

Converts this instance to its JSON representation.

"},{"title":"PrimitiveType","link":"PrimitiveType","description":"

Represents a primitive type.

"},{"title":"PrimitiveType.BIGINT","link":"BIGINT"},{"title":"PrimitiveType.BOOLEAN","link":"BOOLEAN"},{"title":"PrimitiveType.NULL","link":"NULL"},{"title":"PrimitiveType.NUMBER","link":"NUMBER"},{"title":"PrimitiveType.SPECIAL_NUMBER","link":"SPECIAL_NUMBER"},{"title":"PrimitiveType.STRING","link":"STRING"},{"title":"PrimitiveType.UNDEFINED","link":"UNDEFINED"},{"title":"PrimitiveType.findByName","link":"findByName"},{"title":"PrintResult","link":"PrintResult"},{"title":"PrintResult#data","link":"data","description":"

Gets the data associated with the print result.

"},{"title":"Protocol","link":"Protocol","description":"

Protocol for virtual authenticators

"},{"title":"Protocol.CTAP2","link":"CTAP2"},{"title":"Protocol.U2F","link":"U2F"},{"title":"ProvideResponseParameters","link":"ProvideResponseParameters"},{"title":"ProvideResponseParameters#body","link":"body","description":"

Sets the body value for the response parameters.

"},{"title":"ProvideResponseParameters#cookies","link":"cookies","description":"

Sets the cookie headers for the response.

"},{"title":"ProvideResponseParameters#headers","link":"headers","description":"

Sets the headers for the response.

"},{"title":"ProvideResponseParameters#reasonPhrase","link":"reasonPhrase","description":"

Sets the reason phrase for the response.

"},{"title":"ProvideResponseParameters#statusCode","link":"statusCode","description":"

Sets the status code for the response.

"},{"title":"RealmInfo","link":"RealmInfo","description":"

Constructs a new RealmInfo object.

"},{"title":"RealmType","link":"RealmType","description":"

Represents the types of realms.\nDescribed in https://w3c.github.io/webdriver-bidi/#type-script-RealmType.

"},{"title":"RealmType.AUDIO_WORKLET","link":"AUDIO_WORKLET"},{"title":"RealmType.DEDICATED_WORKER","link":"DEDICATED_WORKER"},{"title":"RealmType.PAINT_WORKLET","link":"PAINT_WORKLET"},{"title":"RealmType.SERVICE_WORKED","link":"SERVICE_WORKED"},{"title":"RealmType.SHARED_WORKED","link":"SHARED_WORKED"},{"title":"RealmType.WINDOW","link":"WINDOW"},{"title":"RealmType.WORKER","link":"WORKER"},{"title":"RealmType.WORKLET","link":"WORKLET"},{"title":"RealmType.findByName","link":"findByName"},{"title":"ReferenceValue","link":"ReferenceValue","description":"

Constructs a new ReferenceValue object.

"},{"title":"RegExpValue","link":"RegExpValue","description":"

Constructs a new RegExpValue object.

"},{"title":"RelativeBy","link":"RelativeBy"},{"title":"RelativeBy#above","link":"above","description":"

Look for elements above the root element passed in

"},{"title":"RelativeBy#below","link":"below","description":"

Look for elements below the root element passed in

"},{"title":"RelativeBy#marshall","link":"marshall","description":"

Returns a marshalled version of the {@link RelativeBy}

"},{"title":"RelativeBy#near","link":"near","description":"

Look for elements near the root element passed in

"},{"title":"RelativeBy#straightAbove","link":"straightAbove","description":"

Look for elements above the root element passed in

"},{"title":"RelativeBy#straightBelow","link":"straightBelow","description":"

Look for elements below the root element passed in

"},{"title":"RelativeBy#straightToLeftOf","link":"straightToLeftOf","description":"

Look for elements left the root element passed in

"},{"title":"RelativeBy#straightToRightOf","link":"straightToRightOf","description":"

Look for elements right the root element passed in

"},{"title":"RelativeBy#toLeftOf","link":"toLeftOf","description":"

Look for elements left the root element passed in

"},{"title":"RelativeBy#toRightOf","link":"toRightOf","description":"

Look for elements right the root element passed in

"},{"title":"RelativeBy#toString","link":"toString"},{"title":"RemoteReferenceType","link":"RemoteReferenceType","description":"

Represents the types of remote reference.

"},{"title":"RemoteReferenceType.HANDLE","link":"HANDLE"},{"title":"RemoteReferenceType.SHARED_ID","link":"SHARED_ID"},{"title":"RemoteType","link":"RemoteType","description":"

Represents a remote value type.

"},{"title":"RemoteType.ARRAY_BUFFER","link":"ARRAY_BUFFER"},{"title":"RemoteType.ERROR","link":"ERROR"},{"title":"RemoteType.FUNCTION","link":"FUNCTION"},{"title":"RemoteType.GENERATOR","link":"GENERATOR"},{"title":"RemoteType.HTML_COLLECTION","link":"HTML_COLLECTION"},{"title":"RemoteType.ITERATOR","link":"ITERATOR"},{"title":"RemoteType.NODE","link":"NODE"},{"title":"RemoteType.NODE_LIST","link":"NODE_LIST"},{"title":"RemoteType.PROMISE","link":"PROMISE"},{"title":"RemoteType.PROXY","link":"PROXY"},{"title":"RemoteType.SYMBOL","link":"SYMBOL"},{"title":"RemoteType.TYPED_ARRAY","link":"TYPED_ARRAY"},{"title":"RemoteType.WEAK_MAP","link":"WEAK_MAP"},{"title":"RemoteType.WEAK_SET","link":"WEAK_SET"},{"title":"RemoteType.WINDOW","link":"WINDOW"},{"title":"RemoteType.findByName","link":"findByName"},{"title":"RemoteValue","link":"RemoteValue"},{"title":"Request","link":"Request"},{"title":"Request#toString","link":"toString"},{"title":"RequestData","link":"RequestData"},{"title":"RequestData#bodySize","link":"bodySize","description":"

Get the size of the request body in bytes.

"},{"title":"RequestData#cookies","link":"cookies","description":"

Get the cookies of the request.

"},{"title":"RequestData#headers","link":"headers","description":"

Get the headers of the request.

"},{"title":"RequestData#headersSize","link":"headersSize","description":"

Get the size of the headers in bytes.

"},{"title":"RequestData#method","link":"method","description":"

Get the HTTP method of the request.

"},{"title":"RequestData#request","link":"request","description":"

Get the request id.

"},{"title":"RequestData#timings","link":"timings","description":"

Get the timing information of the request.

"},{"title":"RequestData#url","link":"url","description":"

Get the URL of the request.

"},{"title":"RequestOptions","link":"RequestOptions"},{"title":"Response","link":"Response"},{"title":"Response#toString","link":"toString"},{"title":"ResponseData","link":"ResponseData"},{"title":"ResponseData#bodySize","link":"bodySize","description":"

Get the size of the body.

"},{"title":"ResponseData#bytesReceived","link":"bytesReceived","description":"

Gets the number of bytes received.

"},{"title":"ResponseData#content","link":"content","description":"

Gets the content.

"},{"title":"ResponseData#fromCache","link":"fromCache","description":"

Gets the value indicating whether the data is retrieved from cache.

"},{"title":"ResponseData#headerSize","link":"headerSize","description":"

Get the size of the headers.

"},{"title":"ResponseData#headers","link":"headers","description":"

Get the headers.

"},{"title":"ResponseData#mimeType","link":"mimeType","description":"

The MIME type of the network resource.

"},{"title":"ResponseData#protocol","link":"protocol","description":"

Get the protocol.

"},{"title":"ResponseData#status","link":"status","description":"

Get the HTTP status.

"},{"title":"ResponseData#statusText","link":"statusText","description":"

Gets the status text.

"},{"title":"ResponseData#url","link":"url","description":"

Get the URL.

"},{"title":"ResponseStarted","link":"ResponseStarted"},{"title":"ResponseStarted#response","link":"response","description":"

Get the response data.

"},{"title":"Result","link":"Result"},{"title":"Result#code","link":"code"},{"title":"Result#signal","link":"signal"},{"title":"Result#toString","link":"toString"},{"title":"ResultOwnership","link":"ResultOwnership","description":"

Enum representing the ownership types.

"},{"title":"ResultOwnership.NONE","link":"NONE"},{"title":"ResultOwnership.ROOT","link":"ROOT"},{"title":"SameSite","link":"SameSite","description":"

Represents the possible values for the SameSite attribute of a cookie.

"},{"title":"SameSite.LAX","link":"LAX"},{"title":"SameSite.NONE","link":"NONE"},{"title":"SameSite.STRICT","link":"STRICT"},{"title":"SameSite.findByName","link":"findByName"},{"title":"ScriptManager","link":"ScriptManager"},{"title":"ScriptManager#addPreloadScript","link":"addPreloadScript","description":"

Adds a preload script.

"},{"title":"ScriptManager#callFunctionInBrowsingContext","link":"callFunctionInBrowsingContext","description":"

Calls a function in the specified browsing context.

"},{"title":"ScriptManager#callFunctionInRealm","link":"callFunctionInRealm","description":"

Calls a function in the specified realm.

"},{"title":"ScriptManager#disownBrowsingContextScript","link":"disownBrowsingContextScript","description":"

Disowns the handles in the specified browsing context.

"},{"title":"ScriptManager#disownRealmScript","link":"disownRealmScript","description":"

Disowns the handles in the specified realm.

"},{"title":"ScriptManager#evaluateFunctionInBrowsingContext","link":"evaluateFunctionInBrowsingContext","description":"

Evaluates a function in the browsing context.

"},{"title":"ScriptManager#evaluateFunctionInRealm","link":"evaluateFunctionInRealm","description":"

Evaluates a function in the specified realm.

"},{"title":"ScriptManager#getAllRealms","link":"getAllRealms","description":"

Retrieves all realms.

"},{"title":"ScriptManager#getRealmsByType","link":"getRealmsByType","description":"

Retrieves the realms by type.

"},{"title":"ScriptManager#getRealmsInBrowsingContext","link":"getRealmsInBrowsingContext","description":"

Retrieves the realms in the specified browsing context.

"},{"title":"ScriptManager#getRealmsInBrowsingContextByType","link":"getRealmsInBrowsingContextByType","description":"

Retrieves the realms in a browsing context based on the specified type.

"},{"title":"ScriptManager#onMessage","link":"onMessage","description":"

Subscribes to the 'script.message' event and handles the callback function when a message is received.

"},{"title":"ScriptManager#onRealmCreated","link":"onRealmCreated","description":"

Subscribes to the 'script.realmCreated' event and handles it with the provided callback.

"},{"title":"ScriptManager#onRealmDestroyed","link":"onRealmDestroyed","description":"

Subscribes to the 'script.realmDestroyed' event and handles it with the provided callback function.

"},{"title":"ScriptManager#removePreloadScript","link":"removePreloadScript","description":"

Removes a preload script.

"},{"title":"ScriptTimeoutError","link":"ScriptTimeoutError"},{"title":"Select","link":"Select","description":"

Create an Select Element

"},{"title":"Select#deselectAll","link":"deselectAll","description":"

Deselects all selected options

"},{"title":"Select#deselectByIndex","link":"deselectByIndex"},{"title":"Select#deselectByValue","link":"deselectByValue"},{"title":"Select#deselectByVisibleText","link":"deselectByVisibleText"},{"title":"Select#getAllSelectedOptions","link":"getAllSelectedOptions","description":"

Returns a list of all selected options belonging to this select tag

"},{"title":"Select#getFirstSelectedOption","link":"getFirstSelectedOption","description":"

Returns first Selected Option

"},{"title":"Select#getOptions","link":"getOptions","description":"

Returns a list of all options belonging to this select tag

"},{"title":"Select#isMultiple","link":"isMultiple","description":"

Returns a boolean value if the select tag is multiple

"},{"title":"Select#selectByIndex","link":"selectByIndex","description":"

Select option with specified index.

\n\n \n const selectBox = await driver.findElement(By.id(\"selectbox\"));\n await selectObject.selectByIndex(1);\n"},{"title":"Select#selectByValue","link":"selectByValue","description":"

Select option by specific value.

\n\n \n const selectBox = await driver.findElement(By.id(\"selectbox\"));\n await selectObject.selectByVisibleText(\"Option 2\");\n"},{"title":"Select#selectByVisibleText","link":"selectByVisibleText","description":"

Select option with displayed text matching the argument.

\n\n \n const selectBox = await driver.findElement(By.id(\"selectbox\"));\n await selectObject.selectByVisibleText(\"Option 2\");\n"},{"title":"SeleniumServer","link":"SeleniumServer"},{"title":"SeleniumServer.Options","link":"Options"},{"title":"SeleniumServer.Options#args","link":"args","description":"

The arguments to pass to the service. If a promise is provided,\nthe service will wait for it to resolve before starting.

"},{"title":"SeleniumServer.Options#env","link":"env","description":"

The environment variables that should be visible to the server\nprocess. Defaults to inheriting the current process's environment.

"},{"title":"SeleniumServer.Options#jvmArgs","link":"jvmArgs","description":"

The arguments to pass to the JVM. If a promise is provided,\nthe service will wait for it to resolve before starting.

"},{"title":"SeleniumServer.Options#loopback","link":"loopback","description":"

Whether the server should only be accessible on this host's loopback\naddress.

"},{"title":"SeleniumServer.Options#port","link":"port","description":"

The port to start the server on (must be > 0). If the port is provided as\na promise, the service will wait for the promise to resolve before\nstarting.

"},{"title":"SeleniumServer.Options#stdio","link":"stdio","description":"

IO configuration for the spawned server process. If unspecified, IO will\nbe ignored.

"},{"title":"SerializationOptions","link":"SerializationOptions","description":"

Constructs a new instance of SerializationOptions.

"},{"title":"Server","link":"Server","description":"

Encapsulates a simple HTTP server for testing. The {@code onrequest}\nfunction should be overridden to define request handling behavior.

"},{"title":"Server#address","link":"address"},{"title":"Server#host","link":"host","description":"

return {string} The host:port of this server.

"},{"title":"Server#start","link":"start","description":"

Starts the server on the given port. If no port, or 0, is provided,\nthe server will be started on a random port.

"},{"title":"Server#stop","link":"stop","description":"

Stops the server.

"},{"title":"Server#url","link":"url","description":"

Formats a URL for this server.

"},{"title":"Server~Host","link":"Host"},{"title":"ServiceOptions","link":"ServiceOptions","description":"

A record object that defines the configuration options for a DriverService\ninstance.

"},{"title":"ServiceOptions#args","link":"args","description":"

The arguments to pass to the service. If a promise is provided, the service\nwill wait for it to resolve before starting.

"},{"title":"ServiceOptions#env","link":"env","description":"

The environment variables that should be visible to the server process.\nDefaults to inheriting the current process's environment.

"},{"title":"ServiceOptions#hostname","link":"hostname","description":"

The host name to access the server on. If this option is specified, the\n{@link #loopback} option will be ignored.

"},{"title":"ServiceOptions#loopback","link":"loopback","description":"

Whether the service should only be accessed on this host's loopback address.

"},{"title":"ServiceOptions#path","link":"path","description":"

The base path on the server for the WebDriver wire protocol (e.g. '/wd/hub').\nDefaults to '/'.

"},{"title":"ServiceOptions#port","link":"port","description":"

The port to start the server on (must be > 0). If the port is provided as a\npromise, the service will wait for the promise to resolve before starting.

"},{"title":"ServiceOptions#stdio","link":"stdio","description":"

IO configuration for the spawned server process. For more information, refer\nto the documentation of child_process.spawn.

"},{"title":"Session","link":"Session"},{"title":"Session#getCapabilities","link":"getCapabilities"},{"title":"Session#getCapability","link":"getCapability","description":"

Retrieves the value of a specific capability.

"},{"title":"Session#getId","link":"getId"},{"title":"Session#toJSON","link":"toJSON","description":"

Returns the JSON representation of this object, which is just the string\nsession ID.

"},{"title":"SessionNotCreatedError","link":"SessionNotCreatedError"},{"title":"ShadowRoot","link":"ShadowRoot"},{"title":"ShadowRoot#Symbols.serialize","link":"serialize"},{"title":"ShadowRoot#findElement","link":"findElement","description":"

Schedule a command to find a descendant of this ShadowROot. If the element\ncannot be found, the returned promise will be rejected with a\n{@linkplain error.NoSuchElementError NoSuchElementError}.

\n

The search criteria for an element may be defined using one of the static\nfactories on the {@link by.By} class, or as a short-hand\n{@link ./by.ByHash} object. For example, the following two statements\nare equivalent:

\n
var e1 = shadowroot.findElement(By.id('foo'));\nvar e2 = shadowroot.findElement({id:'foo'});\n
\n

You may also provide a custom locator function, which takes as input this\ninstance and returns a {@link WebElement}, or a promise that will resolve\nto a WebElement. If the returned promise resolves to an array of\nWebElements, WebDriver will use the first element. For example, to find the\nfirst visible link on a page, you could write:

\n
var link = element.findElement(firstVisibleLink);\n\nfunction firstVisibleLink(shadowRoot) {\n  var links = shadowRoot.findElements(By.tagName('a'));\n  return promise.filter(links, function(link) {\n    return link.isDisplayed();\n  });\n}\n
"},{"title":"ShadowRoot#findElements","link":"findElements","description":"

Locates all the descendants of this element that match the given search\ncriteria.

"},{"title":"ShadowRoot.extractId","link":"extractId","description":"

Extracts the encoded ShadowRoot ID from the object.

"},{"title":"ShadowRoot.isId","link":"isId"},{"title":"ShadowRootPromise","link":"ShadowRootPromise"},{"title":"ShadowRootPromise#catch","link":"catch"},{"title":"ShadowRootPromise#getId","link":"getId","description":"

Defers returning the ShadowRoot ID until the wrapped WebElement has been\nresolved.

"},{"title":"ShadowRootPromise#then","link":"then"},{"title":"Source","link":"Source"},{"title":"Source#browsingContextId","link":"browsingContextId","description":"

Get the browsing context ID.

"},{"title":"Source#realmId","link":"realmId","description":"

Get the realm ID.

"},{"title":"SpecialNumberType","link":"SpecialNumberType","description":"

Represents a speacial number type.

"},{"title":"SpecialNumberType.INFINITY","link":"INFINITY"},{"title":"SpecialNumberType.MINUS_INFINITY","link":"MINUS_INFINITY"},{"title":"SpecialNumberType.MINUS_ZERO","link":"MINUS_ZERO"},{"title":"SpecialNumberType.NAN","link":"NAN"},{"title":"StaleElementReferenceError","link":"StaleElementReferenceError"},{"title":"StdIoOptions","link":"StdIoOptions"},{"title":"Storage","link":"Storage"},{"title":"Storage#deleteCookies","link":"deleteCookies","description":"

Deletes cookies based on the provided filter and partition.

"},{"title":"Storage#getCookies","link":"getCookies","description":"

Retrieves cookies based on the provided filter and partition.

"},{"title":"Storage#setCookie","link":"setCookie","description":"

Sets a cookie using the provided cookie object and partition.

"},{"title":"StorageKeyPartitionDescriptor","link":"StorageKeyPartitionDescriptor"},{"title":"StorageKeyPartitionDescriptor#sourceOrigin","link":"sourceOrigin","description":"

Sets the source origin for the partition descriptor.

"},{"title":"StorageKeyPartitionDescriptor#userContext","link":"userContext","description":"

Sets the user context for the partition descriptor.

"},{"title":"SuiteOptions","link":"SuiteOptions","description":"

Configuration options for a {@linkplain ./index.suite test suite}.

"},{"title":"SuiteOptions#browsers","link":"browsers","description":"

The browsers to run the test suite against.

"},{"title":"THENABLE_DRIVERS","link":"THENABLE_DRIVERS"},{"title":"TargetBrowser","link":"TargetBrowser","description":"

Describes a browser targeted by a {@linkplain suite test suite}.

"},{"title":"TargetBrowser#name","link":"name","description":"

The {@linkplain Browser name} of the targeted browser.

"},{"title":"TargetBrowser#platform","link":"platform","description":"

The specific {@linkplain ../lib/capabilities.Platform platform} for the\ntargeted browser, if any.

"},{"title":"TargetBrowser#version","link":"version","description":"

The specific version of the targeted browser, if any.

"},{"title":"TargetLocator#activeElement","link":"activeElement","description":"

Locates the DOM element on the current page that corresponds to\ndocument.activeElement or document.body if the active element is not\navailable.

"},{"title":"TargetLocator#alert","link":"alert","description":"

Changes focus to the active modal dialog, such as those opened by\nwindow.alert(), window.confirm(), and window.prompt(). The returned\npromise will be rejected with a\n{@linkplain error.NoSuchAlertError} if there are no open alerts.

"},{"title":"TargetLocator#defaultContent","link":"defaultContent","description":"

Switches focus of all future commands to the topmost frame in the current\nwindow.

"},{"title":"TargetLocator#frame","link":"frame","description":"

Changes the focus of all future commands to another frame on the page. The\ntarget frame may be specified as one of the following:

\n
    \n
  • A number that specifies a (zero-based) index into window.frames.
  • \n
  • A {@link WebElement} reference, which correspond to a frame or iframe\nDOM element.
  • \n
  • The null value, to select the topmost frame on the page. Passing null\nis the same as calling {@link #defaultContent defaultContent()}.
  • \n
\n

If the specified frame can not be found, the returned promise will be\nrejected with a {@linkplain error.NoSuchFrameError}.

"},{"title":"TargetLocator#newWindow","link":"newWindow","description":"

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

"},{"title":"TargetLocator#parentFrame","link":"parentFrame","description":"

Changes the focus of all future commands to the parent frame of the\ncurrently selected frame. This command has no effect if the driver is\nalready focused on the top-level browsing context.

"},{"title":"TargetLocator#window","link":"window","description":"

Changes the focus of all future commands to another window. Windows may be\nspecified by their {@code window.name} attribute or by its handle\n(as returned by {@link WebDriver#getWindowHandles}).

\n

If the specified window cannot be found, the returned promise will be\nrejected with a {@linkplain error.NoSuchWindowError}.

"},{"title":"ThenableWebDriver","link":"ThenableWebDriver"},{"title":"ThenableWebDriver.createSession","link":"createSession"},{"title":"TimeoutError","link":"TimeoutError"},{"title":"Timeouts","link":"Timeouts","description":"

Record object defining the timeouts that apply to certain WebDriver actions.

"},{"title":"Timeouts#implicit","link":"implicit","description":"

The maximum amount of time, in milliseconds, to spend attempting to\n{@linkplain ./webdriver.IWebDriver#findElement locate} an element on the\ncurrent page.

"},{"title":"Timeouts#pageLoad","link":"pageLoad","description":"

The timeout, in milliseconds, to apply to navigation events along with the\n{@link PageLoadStrategy}.

"},{"title":"Timeouts#script","link":"script","description":"

Defines when, in milliseconds, to interrupt a script that is being\n{@linkplain ./webdriver.IWebDriver#executeScript evaluated}.

"},{"title":"Transport","link":"Transport","description":"

AuthenticatorTransport values

"},{"title":"Transport.BLE","link":"BLE"},{"title":"Transport.INTERNAL","link":"INTERNAL"},{"title":"Transport.NFC","link":"NFC"},{"title":"Transport.USB","link":"USB"},{"title":"Type","link":"Type","description":"

Represents the types of partition descriptors.

"},{"title":"Type","link":"Type","description":"

Common log types.

"},{"title":"Type","link":"Type","description":"

Supported {@linkplain Config proxy configuration} types.

"},{"title":"Type","link":"Type"},{"title":"Type.AUTODETECT","link":"AUTODETECT"},{"title":"Type.BROWSER","link":"BROWSER","description":"

Logs originating from the browser.

"},{"title":"Type.CLIENT","link":"CLIENT","description":"

Logs from a WebDriver client.

"},{"title":"Type.CONTEXT","link":"CONTEXT"},{"title":"Type.DIRECT","link":"DIRECT"},{"title":"Type.DRIVER","link":"DRIVER","description":"

Logs from a WebDriver implementation.

"},{"title":"Type.MANUAL","link":"MANUAL"},{"title":"Type.PAC","link":"PAC"},{"title":"Type.PERFORMANCE","link":"PERFORMANCE","description":"

Logs related to performance.

"},{"title":"Type.SERVER","link":"SERVER","description":"

Logs from the remote server.

"},{"title":"Type.STORAGE_KEY","link":"STORAGE_KEY"},{"title":"Type.SYSTEM","link":"SYSTEM"},{"title":"USER_AGENT","link":"USER_AGENT"},{"title":"UnableToCaptureScreenError","link":"UnableToCaptureScreenError"},{"title":"UnableToSetCookieError","link":"UnableToSetCookieError"},{"title":"UnexpectedAlertOpenError","link":"UnexpectedAlertOpenError"},{"title":"UnexpectedAlertOpenError#getAlertText","link":"getAlertText"},{"title":"UnknownCommandError","link":"UnknownCommandError"},{"title":"UnknownMethodError","link":"UnknownMethodError"},{"title":"UnsupportedOperationError","link":"UnsupportedOperationError"},{"title":"UrlPattern","link":"UrlPattern"},{"title":"UrlPattern#hostname","link":"hostname","description":"

Sets the hostname for the URL pattern.

"},{"title":"UrlPattern#pathname","link":"pathname","description":"

Sets the pathname for the URL pattern.

"},{"title":"UrlPattern#port","link":"port","description":"

Sets the port for the URL pattern.

"},{"title":"UrlPattern#protocol","link":"protocol","description":"

Sets the protocol for the URL pattern.

"},{"title":"UrlPattern#search","link":"search","description":"

Sets the search parameter in the URL pattern.

"},{"title":"UserPromptHandler","link":"UserPromptHandler","description":"

The possible default actions a WebDriver session can take to respond to\nunhandled user prompts (window.alert(), window.confirm(), and\nwindow.prompt()).

"},{"title":"UserPromptHandler.ACCEPT","link":"ACCEPT","description":"

All prompts should be silently accepted.

"},{"title":"UserPromptHandler.ACCEPT_AND_NOTIFY","link":"ACCEPT_AND_NOTIFY","description":"

All prompts should be automatically accepted, but an error should be\nreturned to the next (or currently executing) WebDriver command.

"},{"title":"UserPromptHandler.DISMISS","link":"DISMISS","description":"

All prompts should be silently dismissed.

"},{"title":"UserPromptHandler.DISMISS_AND_NOTIFY","link":"DISMISS_AND_NOTIFY","description":"

All prompts should be automatically dismissed, but an error should be\nreturned to the next (or currently executing) WebDriver command.

"},{"title":"UserPromptHandler.IGNORE","link":"IGNORE","description":"

All prompts should be left unhandled.

"},{"title":"VirtualAuthenticatorOptions","link":"VirtualAuthenticatorOptions","description":"

Constructor to initialise VirtualAuthenticatorOptions object.

"},{"title":"W3C_COMMAND_MAP","link":"W3C_COMMAND_MAP"},{"title":"WebDriver","link":"WebDriver"},{"title":"WebDriver#actions","link":"actions","description":"

Creates a new action sequence using this driver. The sequence will not be\nsubmitted for execution until\n{@link ./input.Actions#perform Actions.perform()} is called.

"},{"title":"WebDriver#addCredential","link":"addCredential","description":"

Injects a credential into the authenticator.

"},{"title":"WebDriver#addVirtualAuthenticator","link":"addVirtualAuthenticator","description":"

Adds a virtual authenticator with the given options.

"},{"title":"WebDriver#close","link":"close","description":"

Closes the current window.

"},{"title":"WebDriver#createCDPConnection","link":"createCDPConnection","description":"

Creates a new WebSocket connection.

"},{"title":"WebDriver#execute","link":"execute","description":"

Executes the provided {@link command.Command} using this driver's\n{@link command.Executor}.

"},{"title":"WebDriver#executeAsyncScript","link":"executeAsyncScript","description":"

Executes a snippet of asynchronous JavaScript in the context of the\ncurrently selected frame or window. The script fragment will be executed as\nthe body of an anonymous function. If the script is provided as a function\nobject, that function will be converted to a string for injection into the\ntarget window.

\n

Any arguments provided in addition to the script will be included as script\narguments and may be referenced using the arguments object. Arguments may\nbe a boolean, number, string, or {@linkplain WebElement}. Arrays and\nobjects may also be used as script arguments as long as each item adheres\nto the types previously mentioned.

\n

Unlike executing synchronous JavaScript with {@link #executeScript},\nscripts executed with this function must explicitly signal they are\nfinished by invoking the provided callback. This callback will always be\ninjected into the executed function as the last argument, and thus may be\nreferenced with arguments[arguments.length - 1]. The following steps\nwill be taken for resolving this functions return value against the first\nargument to the script's callback function:

\n
    \n
  • For a HTML element, the value will resolve to a {@link WebElement}
  • \n
  • Null and undefined return values will resolve to null
  • \n
  • Booleans, numbers, and strings will resolve as is
  • \n
  • Functions will resolve to their string representation
  • \n
  • For arrays and objects, each member item will be converted according to\nthe rules above
  • \n
\n

Example #1: Performing a sleep that is synchronized with the currently\nselected window:

\n
var start = new Date().getTime();\ndriver.executeAsyncScript(\n    'window.setTimeout(arguments[arguments.length - 1], 500);').\n    then(function() {\n      console.log(\n          'Elapsed time: ' + (new Date().getTime() - start) + ' ms');\n    });\n
\n

Example #2: Synchronizing a test with an AJAX application:

\n
var button = driver.findElement(By.id('compose-button'));\nbutton.click();\ndriver.executeAsyncScript(\n    'var callback = arguments[arguments.length - 1];' +\n    'mailClient.getComposeWindowWidget().onload(callback);');\ndriver.switchTo().frame('composeWidget');\ndriver.findElement(By.id('to')).sendKeys('dog@example.com');\n
\n

Example #3: Injecting a XMLHttpRequest and waiting for the result. In\nthis example, the inject script is specified with a function literal. When\nusing this format, the function is converted to a string for injection, so\nit should not reference any symbols not defined in the scope of the page\nunder test.

\n
driver.executeAsyncScript(function() {\n  var callback = arguments[arguments.length - 1];\n  var xhr = new XMLHttpRequest();\n  xhr.open("GET", "/resource/data.json", true);\n  xhr.onreadystatechange = function() {\n    if (xhr.readyState == 4) {\n      callback(xhr.responseText);\n    }\n  };\n  xhr.send('');\n}).then(function(str) {\n  console.log(JSON.parse(str)['food']);\n});\n
"},{"title":"WebDriver#executeScript","link":"executeScript","description":"

Executes a snippet of JavaScript in the context of the currently selected\nframe or window. The script fragment will be executed as the body of an\nanonymous function. If the script is provided as a function object, that\nfunction will be converted to a string for injection into the target\nwindow.

\n

Any arguments provided in addition to the script will be included as script\narguments and may be referenced using the arguments object. Arguments may\nbe a boolean, number, string, or {@linkplain WebElement}. Arrays and\nobjects may also be used as script arguments as long as each item adheres\nto the types previously mentioned.

\n

The script may refer to any variables accessible from the current window.\nFurthermore, the script will execute in the window's context, thus\ndocument may be used to refer to the current document. Any local\nvariables will not be available once the script has finished executing,\nthough global variables will persist.

\n

If the script has a return value (i.e. if the script contains a return\nstatement), then the following steps will be taken for resolving this\nfunctions return value:

\n
    \n
  • For a HTML element, the value will resolve to a {@linkplain WebElement}
  • \n
  • Null and undefined return values will resolve to null
  • \n
  • Booleans, numbers, and strings will resolve as is
  • \n
  • Functions will resolve to their string representation
  • \n
  • For arrays and objects, each member item will be converted according to\nthe rules above
  • \n
"},{"title":"WebDriver#findElement","link":"findElement","description":"

Locates an element on the page. If the element cannot be found, a\n{@link error.NoSuchElementError} will be returned by the driver.

\n

This function should not be used to test whether an element is present on\nthe page. Rather, you should use {@link #findElements}:

\n
driver.findElements(By.id('foo'))\n    .then(found => console.log('Element found? %s', !!found.length));\n
\n

The search criteria for an element may be defined using one of the\nfactories in the {@link webdriver.By} namespace, or as a short-hand\n{@link webdriver.By.Hash} object. For example, the following two statements\nare equivalent:

\n
var e1 = driver.findElement(By.id('foo'));\nvar e2 = driver.findElement({id:'foo'});\n
\n

You may also provide a custom locator function, which takes as input this\ninstance and returns a {@link WebElement}, or a promise that will resolve\nto a WebElement. If the returned promise resolves to an array of\nWebElements, WebDriver will use the first element. For example, to find the\nfirst visible link on a page, you could write:

\n
var link = driver.findElement(firstVisibleLink);\n\nfunction firstVisibleLink(driver) {\n  var links = driver.findElements(By.tagName('a'));\n  return promise.filter(links, function(link) {\n    return link.isDisplayed();\n  });\n}\n
"},{"title":"WebDriver#findElements","link":"findElements","description":"

Search for multiple elements on the page. Refer to the documentation on\n{@link #findElement(by)} for information on element locator strategies.

"},{"title":"WebDriver#get","link":"get","description":"

Navigates to the given URL.

"},{"title":"WebDriver#getAllWindowHandles","link":"getAllWindowHandles","description":"

Retrieves a list of all available window handles.

"},{"title":"WebDriver#getBidi","link":"getBidi","description":"

Initiates bidi connection using 'webSocketUrl'

"},{"title":"WebDriver#getCapabilities","link":"getCapabilities"},{"title":"WebDriver#getCredentials","link":"getCredentials"},{"title":"WebDriver#getCurrentUrl","link":"getCurrentUrl","description":"

Retrieves the URL for the current page.

"},{"title":"WebDriver#getExecutor","link":"getExecutor"},{"title":"WebDriver#getPageSource","link":"getPageSource","description":"

Retrieves the current page's source. The returned source is a representation\nof the underlying DOM: do not expect it to be formatted or escaped in the\nsame way as the raw response sent from the web server.

"},{"title":"WebDriver#getSession","link":"getSession"},{"title":"WebDriver#getTitle","link":"getTitle","description":"

Retrieves the current page title.

"},{"title":"WebDriver#getWindowHandle","link":"getWindowHandle","description":"

Retrieves the current window handle.

"},{"title":"WebDriver#getWsUrl","link":"getWsUrl","description":"

Retrieves 'webSocketDebuggerUrl' by sending a http request using debugger address

"},{"title":"WebDriver#logMutationEvents","link":"logMutationEvents"},{"title":"WebDriver#manage","link":"manage"},{"title":"WebDriver#navigate","link":"navigate"},{"title":"WebDriver#normalize_","link":"normalize_"},{"title":"WebDriver#onIntercept","link":"onIntercept","description":"

Handle Network interception requests

"},{"title":"WebDriver#onLogEvent","link":"onLogEvent"},{"title":"WebDriver#onLogException","link":"onLogException"},{"title":"WebDriver#printPage","link":"printPage","description":"

Takes a PDF of the current page. The driver makes a best effort to\nreturn a PDF based on the provided parameters.

"},{"title":"WebDriver#quit","link":"quit","description":"

Terminates the browser session. After calling quit, this instance will be\ninvalidated and may no longer be used to issue commands against the\nbrowser.

"},{"title":"WebDriver#register","link":"register","description":"

Sets a listener for Fetch.authRequired event from CDP\nIf event is triggered, it enters username and password\nand allows the test to move forward

"},{"title":"WebDriver#removeAllCredentials","link":"removeAllCredentials","description":"

Removes all the credentials from the authenticator.

"},{"title":"WebDriver#removeCredential","link":"removeCredential","description":"

Removes a credential from the authenticator.

"},{"title":"WebDriver#removeVirtualAuthenticator","link":"removeVirtualAuthenticator","description":"

Removes a previously added virtual authenticator. The authenticator is no\nlonger valid after removal, so no methods may be called.

"},{"title":"WebDriver#setFileDetector","link":"setFileDetector","description":"

Sets the {@linkplain input.FileDetector file detector} that should be\nused with this instance.

"},{"title":"WebDriver#setUserVerified","link":"setUserVerified","description":"

Sets whether the authenticator will simulate success or fail on user verification.

"},{"title":"WebDriver#sleep","link":"sleep","description":"

Makes the driver sleep for the given amount of time.

"},{"title":"WebDriver#switchTo","link":"switchTo"},{"title":"WebDriver#takeScreenshot","link":"takeScreenshot","description":"

Takes a screenshot of the current page. The driver makes the best effort to\nreturn a screenshot of the following, in order of preference:

\n
    \n
  1. Entire page
  2. \n
  3. Current window
  4. \n
  5. Visible portion of the current frame
  6. \n
  7. The entire display containing the browser
  8. \n
"},{"title":"WebDriver#virtualAuthenticatorId","link":"virtualAuthenticatorId"},{"title":"WebDriver#wait","link":"wait","description":"

Waits for a condition to evaluate to a "truthy" value. The condition may be\nspecified by a {@link Condition}, as a custom function, or as any\npromise-like thenable.

\n

For a {@link Condition} or function, the wait will repeatedly\nevaluate the condition until it returns a truthy value. If any errors occur\nwhile evaluating the condition, they will be allowed to propagate. In the\nevent a condition returns a {@linkplain Promise}, the polling loop will\nwait for it to be resolved and use the resolved value for whether the\ncondition has been satisfied. The resolution time for a promise is always\nfactored into whether a wait has timed out.

\n

If the provided condition is a {@link WebElementCondition}, then\nthe wait will return a {@link WebElementPromise} that will resolve to the\nelement that satisfied the condition.

\n

Example: waiting up to 10 seconds for an element to be present on the\npage.

\n
async function example() {\n  let button =\n      await driver.wait(until.elementLocated(By.id('foo')), 10000);\n  await button.click();\n}\n
"},{"title":"WebDriver.createSession","link":"createSession","description":"

Creates a new WebDriver session.

\n

This function will always return a WebDriver instance. If there is an error\ncreating the session, such as the aforementioned SessionNotCreatedError,\nthe driver will have a rejected {@linkplain #getSession session} promise.\nThis rejection will propagate through any subsequent commands scheduled\non the returned WebDriver instance.

\n
let required = Capabilities.firefox();\nlet driver = WebDriver.createSession(executor, {required});\n\n// If the createSession operation failed, then this command will also\n// also fail, propagating the creation failure.\ndriver.get('http://www.google.com').catch(e => console.log(e));\n
"},{"title":"WebDriverError","link":"WebDriverError"},{"title":"WebDriverError#name","link":"name"},{"title":"WebDriverError#remoteStacktrace","link":"remoteStacktrace","description":"

A stacktrace reported by the remote webdriver endpoint that initially\nreported this error. This property will be an empty string if the remote\nend did not provide a stacktrace.

"},{"title":"WebElement","link":"WebElement"},{"title":"WebElement#Symbols.serialize","link":"serialize"},{"title":"WebElement#clear","link":"clear","description":"

Clear the value of this element. This command has no effect if the\nunderlying DOM element is neither a text INPUT element nor a TEXTAREA\nelement.

"},{"title":"WebElement#click","link":"click","description":"

Clicks on this element.

"},{"title":"WebElement#findElement","link":"findElement","description":"

Schedule a command to find a descendant of this element. If the element\ncannot be found, the returned promise will be rejected with a\n{@linkplain error.NoSuchElementError NoSuchElementError}.

\n

The search criteria for an element may be defined using one of the static\nfactories on the {@link by.By} class, or as a short-hand\n{@link ./by.ByHash} object. For example, the following two statements\nare equivalent:

\n
var e1 = element.findElement(By.id('foo'));\nvar e2 = element.findElement({id:'foo'});\n
\n

You may also provide a custom locator function, which takes as input this\ninstance and returns a {@link WebElement}, or a promise that will resolve\nto a WebElement. If the returned promise resolves to an array of\nWebElements, WebDriver will use the first element. For example, to find the\nfirst visible link on a page, you could write:

\n
var link = element.findElement(firstVisibleLink);\n\nfunction firstVisibleLink(element) {\n  var links = element.findElements(By.tagName('a'));\n  return promise.filter(links, function(link) {\n    return link.isDisplayed();\n  });\n}\n
"},{"title":"WebElement#findElements","link":"findElements","description":"

Locates all the descendants of this element that match the given search\ncriteria.

"},{"title":"WebElement#getAccessibleName","link":"getAccessibleName","description":"

Get the computed WAI-ARIA label of element.

"},{"title":"WebElement#getAriaRole","link":"getAriaRole","description":"

Get the computed WAI-ARIA role of element.

"},{"title":"WebElement#getAttribute","link":"getAttribute","description":"

Retrieves the current value of the given attribute of this element.\nWill return the current value, even if it has been modified after the page\nhas been loaded. More exactly, this method will return the value\nof the given attribute, unless that attribute is not present, in which case\nthe value of the property with the same name is returned. If neither value\nis set, null is returned (for example, the "value" property of a textarea\nelement). The "style" attribute is converted as best can be to a\ntext representation with a trailing semicolon. The following are deemed to\nbe "boolean" attributes and will return either "true" or null:

\n

async, autofocus, autoplay, checked, compact, complete, controls, declare,\ndefaultchecked, defaultselected, defer, disabled, draggable, ended,\nformnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope,\nloop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open,\npaused, pubdate, readonly, required, reversed, scoped, seamless, seeking,\nselected, spellcheck, truespeed, willvalidate

\n

Finally, the following commonly mis-capitalized attribute/property names\nare evaluated as expected:

\n
    \n
  • "class"
  • \n
  • "readonly"
  • \n
"},{"title":"WebElement#getCssValue","link":"getCssValue","description":"

Retrieves the value of a computed style property for this instance. If\nthe element inherits the named style from its parent, the parent will be\nqueried for its value. Where possible, color values will be converted to\ntheir hex representation (e.g. #00ff00 instead of rgb(0, 255, 0)).

\n

Warning: the value returned will be as the browser interprets it, so\nit may be tricky to form a proper assertion.

"},{"title":"WebElement#getDomAttribute","link":"getDomAttribute","description":"

Get the value of the given attribute of the element.

\n

\nThis method, unlike {@link #getAttribute(String)}, returns the value of the attribute with the\ngiven name but not the property with the same name.\n

\nThe following are deemed to be \"boolean\" attributes, and will return either \"true\" or null:\n

\nasync, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked,\ndefaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate,\niscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade,\nnovalidate, nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless,\nseeking, selected, truespeed, willvalidate\n

\nSee W3C WebDriver specification\nfor more details."},{"title":"WebElement#getDriver","link":"getDriver"},{"title":"WebElement#getId","link":"getId"},{"title":"WebElement#getProperty","link":"getProperty","description":"

Get the given property of the referenced web element

"},{"title":"WebElement#getRect","link":"getRect","description":"

Returns an object describing an element's location, in pixels relative to\nthe document element, and the element's size in pixels.

"},{"title":"WebElement#getShadowRoot","link":"getShadowRoot","description":"

Get the shadow root of the current web element.

"},{"title":"WebElement#getTagName","link":"getTagName","description":"

Retrieves the element's tag name.

"},{"title":"WebElement#getText","link":"getText","description":"

Get the visible (i.e. not hidden by CSS) innerText of this element,\nincluding sub-elements, without any leading or trailing whitespace.

"},{"title":"WebElement#isDisplayed","link":"isDisplayed","description":"

Test whether this element is currently displayed.

"},{"title":"WebElement#isEnabled","link":"isEnabled","description":"

Tests whether this element is enabled, as dictated by the disabled\nattribute.

"},{"title":"WebElement#isSelected","link":"isSelected","description":"

Tests whether this element is selected.

"},{"title":"WebElement#sendKeys","link":"sendKeys","description":"

Types a key sequence on the DOM element represented by this instance.

\n

Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is\nprocessed in the key sequence, that key state is toggled until one of the\nfollowing occurs:

\n
    \n
  • \n

    The modifier key is encountered again in the sequence. At this point the\nstate of the key is toggled (along with the appropriate keyup/down\nevents).

    \n
  • \n
  • \n

    The {@link input.Key.NULL} key is encountered in the sequence. When\nthis key is encountered, all modifier keys current in the down state are\nreleased (with accompanying keyup events). The NULL key can be used to\nsimulate common keyboard shortcuts:

    \n
      element.sendKeys("text was",\n                   Key.CONTROL, "a", Key.NULL,\n                   "now text is");\n  // Alternatively:\n  element.sendKeys("text was",\n                   Key.chord(Key.CONTROL, "a"),\n                   "now text is");\n
    \n
  • \n
  • \n

    The end of the key sequence is encountered. When there are no more keys\nto type, all depressed modifier keys are released (with accompanying\nkeyup events).

    \n
  • \n
\n

If this element is a file input ({@code }), the\nspecified key sequence should specify the path to the file to attach to\nthe element. This is analogous to the user clicking "Browse..." and entering\nthe path into the file select dialog.

\n
var form = driver.findElement(By.css('form'));\nvar element = form.findElement(By.css('input[type=file]'));\nelement.sendKeys('/path/to/file.txt');\nform.submit();\n
\n

For uploads to function correctly, the entered path must reference a file\non the browser's machine, not the local machine running this script. When\nrunning against a remote Selenium server, a {@link input.FileDetector}\nmay be used to transparently copy files to the remote machine before\nattempting to upload them in the browser.

\n

Note: On browsers where native keyboard events are not supported\n(e.g. Firefox on OS X), key events will be synthesized. Special\npunctuation keys will be synthesized according to a standard QWERTY en-us\nkeyboard layout.

"},{"title":"WebElement#submit","link":"submit","description":"

Submits the form containing this element (or this element if it is itself\na FORM element). his command is a no-op if the element is not contained in\na form.

"},{"title":"WebElement#takeScreenshot","link":"takeScreenshot","description":"

Take a screenshot of the visible region encompassed by this element's\nbounding rectangle.

"},{"title":"WebElement.buildId","link":"buildId"},{"title":"WebElement.equals","link":"equals","description":"

Compares two WebElements for equality.

"},{"title":"WebElement.extractId","link":"extractId","description":"

Extracts the encoded WebElement ID from the object.

"},{"title":"WebElement.isId","link":"isId"},{"title":"WebElementCondition","link":"WebElementCondition"},{"title":"WebElementPromise","link":"WebElementPromise"},{"title":"WebElementPromise#catch","link":"catch"},{"title":"WebElementPromise#getId","link":"getId","description":"

Defers returning the element ID until the wrapped WebElement has been\nresolved.

"},{"title":"WebElementPromise#then","link":"then"},{"title":"Wheel","link":"Wheel"},{"title":"Wheel#scroll","link":"scroll","description":"

Scrolls a page via the coordinates given

"},{"title":"Window#fullscreen","link":"fullscreen","description":"

Invokes the "full screen" operation on the current window. The exact\nbehavior of this command is specific to individual window managers, but\nthis will typically increase the window size to the size of the physical\ndisplay and hide the browser chrome.

"},{"title":"Window#getRect","link":"getRect","description":"

Retrieves a rect describing the current top-level window's size and\nposition.

"},{"title":"Window#getSize","link":"getSize","description":"

Gets the width and height of the current window

"},{"title":"Window#maximize","link":"maximize","description":"

Maximizes the current window. The exact behavior of this command is\nspecific to individual window managers, but typically involves increasing\nthe window to the maximum available size without going full-screen.

"},{"title":"Window#minimize","link":"minimize","description":"

Minimizes the current window. The exact behavior of this command is\nspecific to individual window managers, but typically involves hiding\nthe window in the system tray.

"},{"title":"Window#setRect","link":"setRect","description":"

Sets the current top-level window's size and position. You may update just\nthe size by omitting x & y, or just the position by omitting\nwidth & height options.

"},{"title":"Window#setSize","link":"setSize","description":"

Sets the width and height of the current window. (window.resizeTo)

"},{"title":"WindowRealmInfo","link":"WindowRealmInfo","description":"

Constructs a new instance of the WindowRealmInfo class.

"},{"title":"Zip","link":"Zip"},{"title":"Zip#addDir","link":"addDir","description":"

Recursively adds a directory and all of its contents to this archive.

"},{"title":"Zip#addFile","link":"addFile","description":"

Adds a file to this zip.

"},{"title":"Zip#getFile","link":"getFile","description":"

Returns the contents of the file in this zip archive with the given path.\nThe returned promise will be rejected with an {@link InvalidArgumentError}\nif either path does not exist within the archive, or if path refers\nto a directory.

"},{"title":"Zip#has","link":"has"},{"title":"Zip#toBuffer","link":"toBuffer","description":"

Returns the compressed data for this archive in a buffer. This method will\nnot wait for any outstanding {@link #addFile add}\n{@link #addDir operations} before encoding the archive.

"},{"title":"ableToSwitchToFrame","link":"ableToSwitchToFrame","description":"

Creates a condition that will wait until the input driver is able to switch\nto the designated frame. The target frame may be specified as

\n
    \n
  1. a numeric index into\nwindow.frames\nfor the currently selected frame.
  2. \n
  3. a {@link ./webdriver.WebElement}, which must reference a FRAME or IFRAME\nelement on the current page.
  4. \n
  5. a locator which may be used to first locate a FRAME or IFRAME on the\ncurrent page before attempting to switch to it.
  6. \n
\n

Upon successful resolution of this condition, the driver will be left\nfocused on the new frame.

"},{"title":"addConsoleHandler","link":"addConsoleHandler","description":"

Adds the console handler to the given logger. The console handler will log\nall messages using the JavaScript Console API.

"},{"title":"alertIsPresent","link":"alertIsPresent","description":"

Creates a condition that waits for an alert to be opened. Upon success, the\nreturned promise will be fulfilled with the handle for the opened alert.

"},{"title":"arraysEqual","link":"arraysEqual","description":"

Checks if the two arrays are equal or not. Conditions to check are:

\n
    \n
  1. If the length of both arrays is equal
  2. \n
  3. If all elements of array1 are present in array2
  4. \n
  5. If all elements of array2 are present in array1
  6. \n
"},{"title":"binaryPaths","link":"binaryPaths","description":"

Determines the path of the correct driver

"},{"title":"buildPath","link":"buildPath","description":"

Builds a fully qualified path using the given set of command parameters. Each\npath segment prefixed with ':' will be replaced by the value of the\ncorresponding parameter. All parameters spliced into the path will be\nremoved from the parameter map.

"},{"title":"buildRequest","link":"buildRequest"},{"title":"buildRequest~toHttpRequest","link":"toHttpRequest"},{"title":"builtTargets","link":"builtTargets","description":"

Targets that have been previously built.

"},{"title":"check","link":"check","description":"

Checks if a value is a valid locator.

"},{"title":"checkCodePoint","link":"checkCodePoint"},{"title":"checkLegacyResponse","link":"checkLegacyResponse","description":"

Checks a legacy response from the Selenium 2.0 wire protocol for an error.

"},{"title":"checkOptions","link":"checkOptions","description":"

In the 3.x releases, the various browser option classes\n(e.g. firefox.Options) had to be manually set as an option using the\nCapabilities class:

\n
let ffo = new firefox.Options();\n// Configure firefox options...\n\nlet caps = new Capabilities();\ncaps.set('moz:firefoxOptions', ffo);\n\nlet driver = new Builder()\n    .withCapabilities(caps)\n    .build();\n
\n

The options are now subclasses of Capabilities and can be used directly. A\ndirect translation of the above is:

\n
let ffo = new firefox.Options();\n// Configure firefox options...\n\nlet driver = new Builder()\n    .withCapabilities(ffo)\n    .build();\n
\n

You can also set the options for various browsers at once and let the builder\nchoose the correct set at runtime (see Builder docs above):

\n
let ffo = new firefox.Options();\n// Configure ...\n\nlet co = new chrome.Options();\n// Configure ...\n\nlet driver = new Builder()\n    .setChromeOptions(co)\n    .setFirefoxOptions(ffo)\n    .build();\n
"},{"title":"checkedCall","link":"checkedCall"},{"title":"checkedNodeCall","link":"checkedNodeCall","description":"

Wraps a function that expects a node-style callback as its final\nargument. This callback expects two arguments: an error value (which will be\nnull if the call succeeded), and the success value as the second argument.\nThe callback will the resolve or reject the returned promise, based on its\narguments.

"},{"title":"color","link":"color"},{"title":"consoleHandler","link":"consoleHandler","description":"

Logs all messages to the Console API.

"},{"title":"copy","link":"copy","description":"

Copies one file to another.

"},{"title":"copyDir","link":"copyDir","description":"

Recursively copies the contents of one directory to another.

"},{"title":"createDriver","link":"createDriver"},{"title":"createDriver~thenableWebDriverProxy","link":"thenableWebDriverProxy"},{"title":"createDriver~thenableWebDriverProxy#catch","link":"catch"},{"title":"createDriver~thenableWebDriverProxy#then","link":"then"},{"title":"delayed","link":"delayed","description":"

Creates a promise that will be resolved at a set time in the future.

"},{"title":"direct","link":"direct","description":"

Configures WebDriver to bypass all browser proxies.

"},{"title":"elementIsDisabled","link":"elementIsDisabled","description":"

Creates a condition that will wait for the given element to be disabled.

"},{"title":"elementIsEnabled","link":"elementIsEnabled","description":"

Creates a condition that will wait for the given element to be enabled.

"},{"title":"elementIsNotSelected","link":"elementIsNotSelected","description":"

Creates a condition that will wait for the given element to be deselected.

"},{"title":"elementIsNotVisible","link":"elementIsNotVisible","description":"

Creates a condition that will wait for the given element to be in the DOM,\nyet not visible to the user.

"},{"title":"elementIsSelected","link":"elementIsSelected","description":"

Creates a condition that will wait for the given element to be selected.

"},{"title":"elementIsVisible","link":"elementIsVisible","description":"

Creates a condition that will wait for the given element to become visible.

"},{"title":"elementLocated","link":"elementLocated","description":"

Creates a condition that will loop until an element is\n{@link ./webdriver.WebDriver#findElement found} with the given locator.

"},{"title":"elementTextContains","link":"elementTextContains","description":"

Creates a condition that will wait for the given element's\n{@link webdriver.WebDriver#getText visible text} to contain the given\nsubstring.

"},{"title":"elementTextIs","link":"elementTextIs","description":"

Creates a condition that will wait for the given element's\n{@link webdriver.WebDriver#getText visible text} to match the given\n{@code text} exactly.

"},{"title":"elementTextMatches","link":"elementTextMatches","description":"

Creates a condition that will wait for the given element's\n{@link webdriver.WebDriver#getText visible text} to match a regular\nexpression.

"},{"title":"elementsLocated","link":"elementsLocated","description":"

Creates a condition that will loop until at least one element is\n{@link ./webdriver.WebDriver#findElement found} with the given locator.

"},{"title":"encodeError","link":"encodeError"},{"title":"ensureFileDetectorsAreEnabled","link":"ensureFileDetectorsAreEnabled","description":"

{@linkplain webdriver.WebDriver#setFileDetector WebDriver's setFileDetector}\nmethod uses a non-standard command to transfer files from the local client\nto the remote end hosting the browser. Many of the WebDriver sub-types, like\nthe {@link chrome.Driver} and {@link firefox.Driver}, do not support this\ncommand. Thus, these classes override the setFileDetector to no-op.

\n

This function uses a mixin to re-enable setFileDetector by calling the\noriginal method on the WebDriver prototype directly. This is used only when\nthe builder creates a Chrome or Firefox instance that communicates with a\nremote end (and thus, support for remote file detectors is unknown).

"},{"title":"escapeCss","link":"escapeCss","description":"

Escapes a CSS string.

"},{"title":"exec","link":"exec","description":"

Spawns a child process. The returned {@link Command} may be used to wait\nfor the process result or to send signals to the process.

"},{"title":"executeCommand","link":"executeCommand","description":"

Translates a command to its wire-protocol representation before passing it\nto the given executor for execution.

"},{"title":"exists","link":"exists","description":"

Tests if a file path exists.

"},{"title":"extractId","link":"extractId","description":"

Extracts the encoded WebElement ID from the object.

"},{"title":"filter","link":"filter","description":"

Calls a function for each element in an array, and if the function returns\ntrue adds the element to a new array.

\n

If the return value of the filter function is a promise, this function\nwill wait for it to be fulfilled before determining whether to insert the\nelement into the new array.

\n

If the filter function throws or returns a rejected promise, the promise\nreturned by this function will be rejected with the same reason. Only the\nfirst failure will be reported; all subsequent errors will be silently\nignored.

"},{"title":"filterNonW3CCaps","link":"filterNonW3CCaps"},{"title":"findFreePort","link":"findFreePort"},{"title":"findInPath","link":"findInPath","description":"

Searches the {@code PATH} environment variable for the given file.

"},{"title":"formatSpawnArgs","link":"formatSpawnArgs"},{"title":"fromWireValue","link":"fromWireValue","description":"

Converts a value from its JSON representation according to the WebDriver wire\nprotocol. Any JSON object that defines a WebElement ID will be decoded to a\n{@link WebElement} object. All other values will be passed through as is.

"},{"title":"fullyResolveKeys","link":"fullyResolveKeys"},{"title":"fullyResolved","link":"fullyResolved","description":"

Returns a promise that will be resolved with the input value in a\nfully-resolved state. If the value is an array, each element will be fully\nresolved. Likewise, if the value is an object, all keys will be fully\nresolved. In both cases, all nested arrays and objects will also be\nfully resolved. All fields are resolved in place; the returned promise will\nresolve on {@code value} and not a copy.

\n

Warning: This function makes no checks against objects that contain\ncyclical references:

\n
var value = {};\nvalue['self'] = value;\npromise.fullyResolved(value);  // Stack overflow.\n
"},{"title":"getAddress","link":"getAddress","description":"

Retrieves the external IP address for this host.

"},{"title":"getAvailableBrowsers","link":"getAvailableBrowsers"},{"title":"getBinary","link":"getBinary","description":"

Determines the path of the correct Selenium Manager binary

"},{"title":"getBinaryPaths","link":"getBinaryPaths","description":"

Determines the path of the correct Selenium Manager binary

"},{"title":"getBrowsersToTestFromEnv","link":"getBrowsersToTestFromEnv","description":"

Extracts the browsers for a test suite to target from the SELENIUM_BROWSER\nenvironment variable.

"},{"title":"getBrowsingContextInstance","link":"getBrowsingContextInstance","description":"

initiate browsing context instance and return

"},{"title":"getIPAddress","link":"getIPAddress","description":"

Queries the system network interfaces for an IP address.

"},{"title":"getJavaPath","link":"getJavaPath","description":"

returns path to java or 'java' string if JAVA_HOME does not exist in env obj

"},{"title":"getLevel","link":"getLevel","description":"

Converts a level name or value to a {@link Level} value. If the name/value\nis not recognized, {@link Level.ALL} will be returned.

"},{"title":"getLogInspectorInstance","link":"getLogInspectorInstance","description":"

initiate inspector instance and return

"},{"title":"getLogger","link":"getLogger","description":"

Retrieves a named logger, creating it in the process. This function will\nimplicitly create the requested logger, and any of its parents, if they\ndo not yet exist.

\n

The log level will be unspecified for newly created loggers. Use\n{@link Logger#setLevel(level)} to explicitly set a level.

"},{"title":"getLoopbackAddress","link":"getLoopbackAddress","description":"

Retrieves a loopback address for this machine.

"},{"title":"getRequestOptions","link":"getRequestOptions"},{"title":"getStatus","link":"getStatus","description":"

Queries a WebDriver server for its current status.

"},{"title":"getTestHook","link":"getTestHook"},{"title":"headersToString","link":"headersToString","description":"

Converts a headers map to a HTTP header block string.

"},{"title":"http/index.js","link":"http/index.js","description":"

Defines an {@linkplain cmd.Executor command executor} that\ncommunicates with a remote end using HTTP + JSON.

"},{"title":"http/util.js","link":"http/util.js","description":"

Various HTTP utilities.

"},{"title":"ignore","link":"ignore","description":"

Returns an object with wrappers for the standard mocha/jasmine test\nfunctions: describe and it, which will redirect to xdescribe and xit,\nrespectively, if provided predicate function returns false.

\n

Sample usage:

\n
const {Browser} = require('selenium-webdriver');\nconst {suite, ignore} = require('selenium-webdriver/testing');\n\nsuite(function(env) {\n\n    // Skip tests the current environment targets Chrome.\n    ignore(env.browsers(Browser.CHROME)).\n    describe('something', async function() {\n      let driver = await env.builder().build();\n      // etc.\n    });\n});\n
"},{"title":"index.js","link":"index.js","description":"

The main user facing module. Exports WebDriver's primary\npublic API and provides convenience assessors to certain sub-modules.

"},{"title":"init","link":"init","description":"

Initializes this module by determining which browsers a\n{@linkplain ./index.suite test suite} should run against. The default\nbehavior is to run tests against every browser with a WebDriver executables\n(chromedriver, firefoxdriver, etc.) are installed on the system by PATH.

\n

Specific browsers can be selected at runtime by setting the\nSELENIUM_BROWSER environment variable. This environment variable has the\nsame semantics as with the WebDriver {@link ../index.Builder Builder},\nexcept you may use a comma-delimited list to run against multiple browsers:

\n
SELENIUM_BROWSER=chrome,firefox mocha --recursive tests/\n
\n

The SELENIUM_REMOTE_URL environment variable may be set to configure tests\nto run against an externally managed (usually remote) Selenium server. When\nset, the WebDriver builder provided by each\n{@linkplain TestEnvironment#builder TestEnvironment} will automatically be\nconfigured to use this server instead of starting a browser driver locally.

\n

The SELENIUM_SERVER_JAR environment variable may be set to the path of a\nstandalone Selenium server on the local machine that should be used for\nWebDriver sessions. When set, the WebDriver builder provided by each\n{@linkplain TestEnvironment} will automatically be configured to use the\nstarted server instead of using a browser driver directly. It should only be\nnecessary to set the SELENIUM_SERVER_JAR when testing locally against\nbrowsers not natively supported by the WebDriver\n{@link ../index.Builder Builder}.

\n

When either of the SELENIUM_REMOTE_URL or SELENIUM_SERVER_JAR environment\nvariables are set, the SELENIUM_BROWSER variable must also be set.

"},{"title":"installConsoleHandler","link":"installConsoleHandler","description":"

Installs the console log handler on the root logger.

"},{"title":"isErrorResponse","link":"isErrorResponse","description":"

Tests if the given value is a valid error response object according to the\nW3C WebDriver spec.

"},{"title":"isFree","link":"isFree","description":"

Tests if a port is free.

"},{"title":"isId","link":"isId"},{"title":"isIdle","link":"isIdle"},{"title":"isObject","link":"isObject","description":"

Determines whether a {@code value} should be treated as an object.

"},{"title":"isPromise","link":"isPromise","description":"

Determines whether a {@code value} should be treated as a promise.\nAny object whose "then" property is a function will be considered a promise.

"},{"title":"isRetryableNetworkError","link":"isRetryableNetworkError"},{"title":"isSelenium3x","link":"isSelenium3x"},{"title":"legacyTimeout","link":"legacyTimeout"},{"title":"lib/by.js","link":"lib/by.js","description":"

Factory methods for the supported locator strategies.

"},{"title":"lib/capabilities.js","link":"lib/capabilities.js","description":"

Defines types related to describing the capabilities of a\nWebDriver session.

"},{"title":"lib/command.js","link":"lib/command.js","description":"

Contains several classes for handling commands.

"},{"title":"lib/http.js","link":"lib/http.js","description":"

Defines an environment agnostic {@linkplain cmd.Executor\ncommand executor} that communicates with a remote end using JSON over HTTP.

\n

Clients should implement the {@link Client} interface, which is used by\nthe {@link Executor} to send commands to the remote end.

"},{"title":"lib/input.js","link":"lib/input.js","description":"

Defines types related to user input with the WebDriver API.

"},{"title":"lib/logging.js","link":"lib/logging.js","description":"

Defines WebDriver's logging system. The logging system is\nbroken into major components: local and remote logging.

\n

The local logging API, which is anchored by the {@linkplain Logger} class is\nsimilar to Java's logging API. Loggers, retrieved by\n{@linkplain #getLogger getLogger(name)}, use hierarchical, dot-delimited\nnamespaces (e.g. "" > "webdriver" > "webdriver.logging"). Recorded log\nmessages are represented by the {@linkplain Entry} class. You can capture log\nrecords by {@linkplain Logger#addHandler attaching} a handler function to the\ndesired logger. For convenience, you can quickly enable logging to the\nconsole by simply calling {@linkplain #installConsoleHandler\ninstallConsoleHandler}.

\n

The remote logging API\nallows you to retrieve logs from a remote WebDriver server. This API uses the\n{@link Preferences} class to define desired log levels prior to creating\na WebDriver session:

\n
var prefs = new logging.Preferences();\nprefs.setLevel(logging.Type.BROWSER, logging.Level.DEBUG);\n\nvar caps = Capabilities.chrome();\ncaps.setLoggingPrefs(prefs);\n// ...\n
\n

Remote log entries, also represented by the {@link Entry} class, may be\nretrieved via {@link webdriver.WebDriver.Logs}:

\n
driver.manage().logs().get(logging.Type.BROWSER)\n    .then(function(entries) {\n       entries.forEach(function(entry) {\n         console.log('[%s] %s', entry.level.name, entry.message);\n       });\n    });\n
\n

NOTE: Only a few browsers support the remote logging API (notably\nFirefox and Chrome). Firefox supports basic logging functionality, while\nChrome exposes robust\nperformance logging\noptions. Remote logging is still considered a non-standard feature, and the\nAPIs exposed by this module for it are non-frozen. This module will be\nupdated, possibly breaking backwards-compatibility, once logging is\nofficially defined by the\nW3C WebDriver spec.

"},{"title":"lib/promise.js","link":"lib/promise.js","description":"

Defines a handful of utility functions to simplify working\nwith promises.

"},{"title":"lib/proxy.js","link":"lib/proxy.js","description":"

Defines functions for configuring a webdriver proxy:

\n
const proxy = require('selenium-webdriver/proxy');\nconst {Capabilities} = require('selenium-webdriver');\n\nlet capabilities = new Capabilities();\ncapabilities.setProxy(proxy.manual({http: 'host:1234'});\n
"},{"title":"lib/symbols.js","link":"lib/symbols.js","description":"

Defines well-known symbols used within the selenium-webdriver\nlibrary.

"},{"title":"lib/until.js","link":"lib/until.js","description":"

Defines common conditions for use with\n{@link webdriver.WebDriver#wait WebDriver wait}.

\n

Sample usage:

\n
driver.get('http://www.google.com/ncr');\n\nvar query = driver.wait(until.elementLocated(By.name('q')));\nquery.sendKeys('webdriver\\n');\n\ndriver.wait(until.titleIs('webdriver - Google Search'));\n
\n

To define a custom condition, simply call WebDriver.wait with a function\nthat will eventually return a truthy-value (neither null, undefined, false,\n0, or the empty string):

\n
driver.wait(function() {\n  return driver.getTitle().then(function(title) {\n    return title === 'webdriver - Google Search';\n  });\n}, 1000);\n
"},{"title":"lib/webdriver.js","link":"lib/webdriver.js","description":"

The heart of the WebDriver JavaScript API.

"},{"title":"lib/webelement.js","link":"lib/webelement.js","description":"

Defines some common methods used for WebElements.

"},{"title":"load","link":"load","description":"

Asynchronously opens a zip archive.

"},{"title":"locate","link":"locate","description":"

Locates a test resource.

"},{"title":"locateWith","link":"locateWith","description":"

Start searching for relative objects using search criteria with By.

"},{"title":"manual","link":"manual","description":"

Manually configures the browser proxy. The following options are\nsupported:

\n
    \n
  • ftp: Proxy host to use for FTP requests
  • \n
  • http: Proxy host to use for HTTP requests
  • \n
  • https: Proxy host to use for HTTPS requests
  • \n
  • bypass: A list of hosts requests should directly connect to,\nbypassing any other proxies for that request. May be specified as a\ncomma separated string, or a list of strings.
  • \n
\n

Behavior is undefined for FTP, HTTP, and HTTPS requests if the\ncorresponding key is omitted from the configuration options.

"},{"title":"map","link":"map","description":"

Calls a function for each element in an array and inserts the result into a\nnew array, which is used as the fulfillment value of the promise returned\nby this function.

\n

If the return value of the mapping function is a promise, this function\nwill wait for it to be fulfilled before inserting it into the new array.

\n

If the mapping function throws or returns a rejected promise, the\npromise returned by this function will be rejected with the same reason.\nOnly the first failure will be reported; all subsequent errors will be\nsilently ignored.

"},{"title":"mkdir","link":"mkdir","description":"

Creates a directory.

"},{"title":"mkdirp","link":"mkdirp","description":"

Recursively creates a directory and any ancestors that do not yet exist.

"},{"title":"module.exports","link":"exports","description":"

API

"},{"title":"module.exports","link":"exports","description":"

API

"},{"title":"module.exports.serialize","link":"serialize","description":"

The serialize symbol specifies a method that returns an object's serialized\nrepresentation. If an object's serialized form is not immediately\navailable, the serialize method will return a promise that will be resolved\nwith the serialized form.

\n

Note that the described method is analogous to objects that define a\ntoJSON() method, except the serialized result may be a promise, or\nanother object with a promised property.

"},{"title":"module:selenium-webdriver/chrome","link":"selenium-webdriver/chrome","description":"

Defines a {@linkplain Driver WebDriver} client for the Chrome\nweb browser. Before using this module, you must download the latest\nChromeDriver release and ensure it can be found on your system PATH.

\n

There are three primary classes exported by this module:

\n
    \n
  1. \n

    {@linkplain ServiceBuilder}: configures the\n{@link selenium-webdriver/remote.DriverService remote.DriverService}\nthat manages the ChromeDriver child process.

    \n
  2. \n
  3. \n

    {@linkplain Options}: defines configuration options for each new Chrome\nsession, such as which {@linkplain Options#setProxy proxy} to use,\nwhat {@linkplain Options#addExtensions extensions} to install, or\nwhat {@linkplain Options#addArguments command-line switches} to use when\nstarting the browser.

    \n
  4. \n
  5. \n

    {@linkplain Driver}: the WebDriver client; each new instance will control\na unique browser session with a clean user profile (unless otherwise\nconfigured through the {@link Options} class).

    \n

    let chrome = require('selenium-webdriver/chrome');\nlet {Builder} = require('selenium-webdriver');

    \n

    let driver = new Builder()\n.forBrowser('chrome')\n.setChromeOptions(new chrome.Options())\n.build();

    \n
  6. \n
\n

Customizing the ChromeDriver Server

\n

By default, every Chrome session will use a single driver service, which is\nstarted the first time a {@link Driver} instance is created and terminated\nwhen this process exits. The default service will inherit its environment\nfrom the current process and direct all output to /dev/null. You may obtain\na handle to this default service using\n{@link #getDefaultService getDefaultService()} and change its configuration\nwith {@link #setDefaultService setDefaultService()}.

\n

You may also create a {@link Driver} with its own driver service. This is\nuseful if you need to capture the server's log output for a specific session:

\n
let chrome = require('selenium-webdriver/chrome');\n\nlet service = new chrome.ServiceBuilder()\n    .loggingTo('/my/log/file.txt')\n    .enableVerboseLogging()\n    .build();\n\nlet options = new chrome.Options();\n// configure browser options ...\n\nlet driver = chrome.Driver.createSession(options, service);\n
\n

Users should only instantiate the {@link Driver} class directly when they\nneed a custom driver service configuration (as shown above). For normal\noperation, users should start Chrome using the\n{@link selenium-webdriver.Builder}.

\n

Working with Android

\n

The ChromeDriver supports running tests on the Chrome browser as\nwell as WebView apps starting in Android 4.4 (KitKat). In order to\nwork with Android, you must first start the adb

\n
adb start-server\n
\n

By default, adb will start on port 5037. You may change this port, but this\nwill require configuring a custom server that will connect\nto adb on the {@linkplain ServiceBuilder#setAdbPort correct port}:

\n
let service = new chrome.ServiceBuilder()\n    .setAdbPort(1234)\n    build();\n// etc.\n
\n

The ChromeDriver may be configured to launch Chrome on Android using\n{@link Options#androidChrome()}:

\n
let driver = new Builder()\n    .forBrowser('chrome')\n    .setChromeOptions(new chrome.Options().androidChrome())\n    .build();\n
\n

Alternatively, you can configure the ChromeDriver to launch an app with a\nChrome-WebView by setting the {@linkplain Options#androidActivity\nandroidActivity} option:

\n
let driver = new Builder()\n    .forBrowser('chrome')\n    .setChromeOptions(new chrome.Options()\n        .androidPackage('com.example')\n        .androidActivity('com.example.Activity'))\n    .build();\n
\n

[Refer to the ChromeDriver site] for more information on using the\nChromeDriver with Android.

"},{"title":"module:selenium-webdriver/chrome~Driver","link":"Driver"},{"title":"module:selenium-webdriver/chrome~Driver.createSession","link":"createSession","description":"

Creates a new session with the ChromeDriver.

"},{"title":"module:selenium-webdriver/chrome~Driver.getDefaultService","link":"getDefaultService","description":"

returns new instance chrome driver service

"},{"title":"module:selenium-webdriver/chrome~Options","link":"Options"},{"title":"module:selenium-webdriver/chrome~Options#androidChrome","link":"androidChrome","description":"

Configures the ChromeDriver to launch Chrome on Android via adb. This\nfunction is shorthand for\n{@link #androidPackage options.androidPackage('com.android.chrome')}.

"},{"title":"module:selenium-webdriver/chrome~Options#setChromeBinaryPath","link":"setChromeBinaryPath","description":"

Sets the path to the Chrome binary to use. On Mac OS X, this path should\nreference the actual Chrome executable, not just the application binary\n(e.g. "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome").

\n

The binary path be absolute or relative to the chromedriver server\nexecutable, but it must exist on the machine that will launch Chrome.

"},{"title":"module:selenium-webdriver/chrome~Options#setChromeLogFile","link":"setChromeLogFile","description":"

Sets the path to Chrome's log file. This path should exist on the machine\nthat will launch Chrome.

"},{"title":"module:selenium-webdriver/chrome~Options#setChromeMinidumpPath","link":"setChromeMinidumpPath","description":"

Sets the directory to store Chrome minidumps in. This option is only\nsupported when ChromeDriver is running on Linux.

"},{"title":"module:selenium-webdriver/chrome~ServiceBuilder","link":"ServiceBuilder"},{"title":"module:selenium-webdriver/chromium","link":"selenium-webdriver/chromium","description":"

Defines an abstract {@linkplain Driver WebDriver} client for\nChromium-based web browsers. These classes should not be instantiated\ndirectly.

\n

There are three primary classes exported by this module:

\n
    \n
  1. \n

    {@linkplain ServiceBuilder}: configures the\n{@link selenium-webdriver/remote.DriverService remote.DriverService}\nthat manages a WebDriver server child process.

    \n
  2. \n
  3. \n

    {@linkplain Options}: defines configuration options for each new Chromium\nsession, such as which {@linkplain Options#setProxy proxy} to use,\nwhat {@linkplain Options#addExtensions extensions} to install, or\nwhat {@linkplain Options#addArguments command-line switches} to use when\nstarting the browser.

    \n
  4. \n
  5. \n

    {@linkplain Driver}: the WebDriver client; each new instance will control\na unique browser session with a clean user profile (unless otherwise\nconfigured through the {@link Options} class).

    \n

    let chrome = require('selenium-webdriver/chrome');\nlet {Builder} = require('selenium-webdriver');

    \n

    let driver = new Builder()\n.forBrowser('chrome')\n.setChromeOptions(new chrome.Options())\n.build();

    \n
  6. \n
\n

Customizing the Chromium WebDriver Server

\n

Subclasses of {@link Driver} are expected to provide a static\ngetDefaultService method. By default, this method will be called every time\na {@link Driver} instance is created to obtain the default driver service\nfor that specific browser (e.g. Chrome or Chromium Edge). Subclasses are\nresponsible for managing the lifetime of the default service.

\n

You may also create a {@link Driver} with its own driver service. This is\nuseful if you need to capture the server's log output for a specific session:

\n
let chrome = require('selenium-webdriver/chrome');\n\nlet service = new chrome.ServiceBuilder()\n    .loggingTo('/my/log/file.txt')\n    .enableVerboseLogging()\n    .build();\n\nlet options = new chrome.Options();\n// configure browser options ...\n\nlet driver = chrome.Driver.createSession(options, service);\n
"},{"title":"module:selenium-webdriver/chromium~Command","link":"Command","description":"

Custom command names supported by Chromium WebDriver.

"},{"title":"module:selenium-webdriver/chromium~Command.DELETE_NETWORK_CONDITIONS","link":"DELETE_NETWORK_CONDITIONS"},{"title":"module:selenium-webdriver/chromium~Command.GET_CAST_ISSUE_MESSAGE","link":"GET_CAST_ISSUE_MESSAGE"},{"title":"module:selenium-webdriver/chromium~Command.GET_CAST_SINKS","link":"GET_CAST_SINKS"},{"title":"module:selenium-webdriver/chromium~Command.GET_NETWORK_CONDITIONS","link":"GET_NETWORK_CONDITIONS"},{"title":"module:selenium-webdriver/chromium~Command.LAUNCH_APP","link":"LAUNCH_APP"},{"title":"module:selenium-webdriver/chromium~Command.SEND_AND_GET_DEVTOOLS_COMMAND","link":"SEND_AND_GET_DEVTOOLS_COMMAND"},{"title":"module:selenium-webdriver/chromium~Command.SEND_DEVTOOLS_COMMAND","link":"SEND_DEVTOOLS_COMMAND"},{"title":"module:selenium-webdriver/chromium~Command.SET_CAST_SINK_TO_USE","link":"SET_CAST_SINK_TO_USE"},{"title":"module:selenium-webdriver/chromium~Command.SET_NETWORK_CONDITIONS","link":"SET_NETWORK_CONDITIONS"},{"title":"module:selenium-webdriver/chromium~Command.SET_PERMISSION","link":"SET_PERMISSION"},{"title":"module:selenium-webdriver/chromium~Command.START_CAST_DESKTOP_MIRRORING","link":"START_CAST_DESKTOP_MIRRORING"},{"title":"module:selenium-webdriver/chromium~Command.START_CAST_TAB_MIRRORING","link":"START_CAST_TAB_MIRRORING"},{"title":"module:selenium-webdriver/chromium~Command.STOP_CASTING","link":"STOP_CASTING"},{"title":"module:selenium-webdriver/chromium~Driver","link":"Driver"},{"title":"module:selenium-webdriver/chromium~Driver#deleteNetworkConditions","link":"deleteNetworkConditions","description":"

Schedules a command to delete Chromium network emulation settings.

"},{"title":"module:selenium-webdriver/chromium~Driver#getCastIssueMessage","link":"getCastIssueMessage","description":"

Returns an error message when there is any issue in a Cast session.

"},{"title":"module:selenium-webdriver/chromium~Driver#getCastSinks","link":"getCastSinks","description":"

Returns the list of cast sinks (Cast devices) available to the Chrome media router.

"},{"title":"module:selenium-webdriver/chromium~Driver#getNetworkConditions","link":"getNetworkConditions","description":"

Schedules a command to get Chromium network emulation settings.

"},{"title":"module:selenium-webdriver/chromium~Driver#launchApp","link":"launchApp","description":"

Schedules a command to launch Chrome App with given ID.

"},{"title":"module:selenium-webdriver/chromium~Driver#sendAndGetDevToolsCommand","link":"sendAndGetDevToolsCommand","description":"

Sends an arbitrary devtools command to the browser and get the result.

"},{"title":"module:selenium-webdriver/chromium~Driver#sendDevToolsCommand","link":"sendDevToolsCommand","description":"

Sends an arbitrary devtools command to the browser.

"},{"title":"module:selenium-webdriver/chromium~Driver#setCastSinkToUse","link":"setCastSinkToUse","description":"

Selects a cast sink (Cast device) as the recipient of media router intents (connect or play).

"},{"title":"module:selenium-webdriver/chromium~Driver#setDownloadPath","link":"setDownloadPath","description":"

Sends a DevTools command to change the browser's download directory.

"},{"title":"module:selenium-webdriver/chromium~Driver#setFileDetector","link":"setFileDetector","description":"

This function is a no-op as file detectors are not supported by this\nimplementation.

"},{"title":"module:selenium-webdriver/chromium~Driver#setNetworkConditions","link":"setNetworkConditions","description":"

Schedules a command to set Chromium network emulation settings.

\n

Sample Usage:

\n

driver.setNetworkConditions({\noffline: false,\nlatency: 5, // Additional latency (ms).\ndownload_throughput: 500 * 1024, // Maximal aggregated download throughput.\nupload_throughput: 500 * 1024 // Maximal aggregated upload throughput.\n});

"},{"title":"module:selenium-webdriver/chromium~Driver#setPermission","link":"setPermission","description":"

Set a permission state to the given value.

"},{"title":"module:selenium-webdriver/chromium~Driver#startCastTabMirroring","link":"startCastTabMirroring","description":"

Initiates tab mirroring for the current browser tab on the specified device.

"},{"title":"module:selenium-webdriver/chromium~Driver#startDesktopMirroring","link":"startDesktopMirroring","description":"

Initiates desktop mirroring for the current browser tab on the specified device.

"},{"title":"module:selenium-webdriver/chromium~Driver#stopCasting","link":"stopCasting","description":"

Stops casting from media router to the specified device, if connected.

"},{"title":"module:selenium-webdriver/chromium~Driver.createSession","link":"createSession","description":"

Creates a new session with the WebDriver server.

"},{"title":"module:selenium-webdriver/chromium~Extensions","link":"Extensions"},{"title":"module:selenium-webdriver/chromium~Extensions#Symbols.serialize","link":"Symbols.serialize"},{"title":"module:selenium-webdriver/chromium~Extensions#add","link":"add","description":"

Add additional extensions to install when launching the browser. Each\nextension should be specified as the path to the packed CRX file, or a\nBuffer for an extension.

"},{"title":"module:selenium-webdriver/chromium~Extensions#length","link":"length"},{"title":"module:selenium-webdriver/chromium~Options","link":"Options"},{"title":"module:selenium-webdriver/chromium~Options#addArguments","link":"addArguments","description":"

Add additional command line arguments to use when launching the browser.\nEach argument may be specified with or without the "--" prefix\n(e.g. "--foo" and "foo"). Arguments with an associated value should be\ndelimited by an "=": "foo=bar".

"},{"title":"module:selenium-webdriver/chromium~Options#addExtensions","link":"addExtensions","description":"

Add additional extensions to install when launching the browser. Each extension\nshould be specified as the path to the packed CRX file, or a Buffer for an\nextension.

"},{"title":"module:selenium-webdriver/chromium~Options#androidActivity","link":"androidActivity","description":"

Sets the name of the activity hosting a Chrome-based Android WebView. This\noption must be set to connect to an Android WebView

"},{"title":"module:selenium-webdriver/chromium~Options#androidDeviceSerial","link":"androidDeviceSerial","description":"

Sets the device serial number to connect to via ADB. If not specified, the\nWebDriver server will select an unused device at random. An error will be\nreturned if all devices already have active sessions.

"},{"title":"module:selenium-webdriver/chromium~Options#androidPackage","link":"androidPackage","description":"

Sets the package name of the Chrome or WebView app.

"},{"title":"module:selenium-webdriver/chromium~Options#androidProcess","link":"androidProcess","description":"

Sets the process name of the Activity hosting the WebView (as given by\nps). If not specified, the process name is assumed to be the same as\n{@link #androidPackage}.

"},{"title":"module:selenium-webdriver/chromium~Options#androidUseRunningApp","link":"androidUseRunningApp","description":"

Sets whether to connect to an already-running instead of the specified\n{@linkplain #androidProcess app} instead of launching the app with a clean\ndata directory.

"},{"title":"module:selenium-webdriver/chromium~Options#debuggerAddress","link":"debuggerAddress","description":"

Sets the address of a Chromium remote debugging server to connect to.\nAddress should be of the form "{hostname|IP address}:port"\n(e.g. "localhost:9222").

"},{"title":"module:selenium-webdriver/chromium~Options#detachDriver","link":"detachDriver","description":"

Sets whether to leave the started browser process running if the controlling\ndriver service is killed before {@link webdriver.WebDriver#quit()} is\ncalled.

"},{"title":"module:selenium-webdriver/chromium~Options#enableBidi","link":"enableBidi","description":"

Enable bidi connection

"},{"title":"module:selenium-webdriver/chromium~Options#excludeSwitches","link":"excludeSwitches","description":"

List of Chrome command line switches to exclude that ChromeDriver by default\npasses when starting Chrome. Do not prefix switches with "--".

"},{"title":"module:selenium-webdriver/chromium~Options#setBinaryPath","link":"setBinaryPath","description":"

Sets the path to the browser binary to use. On Mac OS X, this path should\nreference the actual Chromium executable, not just the application binary\n(e.g. "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome").

\n

The binary path can be absolute or relative to the WebDriver server\nexecutable, but it must exist on the machine that will launch the browser.

"},{"title":"module:selenium-webdriver/chromium~Options#setBrowserLogFile","link":"setBrowserLogFile","description":"

Sets the path to the browser's log file. This path should exist on the machine\nthat will launch the browser.

"},{"title":"module:selenium-webdriver/chromium~Options#setBrowserMinidumpPath","link":"setBrowserMinidumpPath","description":"

Sets the directory to store browser minidumps in. This option is only\nsupported when the driver is running on Linux.

"},{"title":"module:selenium-webdriver/chromium~Options#setLocalState","link":"setLocalState","description":"

Sets preferences for the "Local State" file in Chrome's user data\ndirectory.

"},{"title":"module:selenium-webdriver/chromium~Options#setMobileEmulation","link":"setMobileEmulation","description":"

Configures the browser to emulate a mobile device. For more information, refer\nto the ChromeDriver project page on mobile emulation. Configuration\noptions include:

\n
    \n
  • deviceName: The name of a pre-configured emulated device
  • \n
  • width: screen width, in pixels
  • \n
  • height: screen height, in pixels
  • \n
  • pixelRatio: screen pixel ratio
  • \n
\n

Example 1: Using a Pre-configured Device

\n
let options = new chrome.Options().setMobileEmulation(\n    {deviceName: 'Google Nexus 5'});\n\nlet driver = chrome.Driver.createSession(options);\n
\n

Example 2: Using Custom Screen Configuration

\n
let options = new chrome.Options().setMobileEmulation({deviceMetrics: {\n    width: 360,\n    height: 640,\n    pixelRatio: 3.0\n}});\n\nlet driver = chrome.Driver.createSession(options);\n
"},{"title":"module:selenium-webdriver/chromium~Options#setPerfLoggingPrefs","link":"setPerfLoggingPrefs","description":"

Sets the performance logging preferences. Options include:

\n
    \n
  • enableNetwork: Whether or not to collect events from Network domain.
  • \n
  • enablePage: Whether or not to collect events from Page domain.
  • \n
  • enableTimeline: Whether or not to collect events from Timeline domain.\nNote: when tracing is enabled, Timeline domain is implicitly disabled,\nunless enableTimeline is explicitly set to true.
  • \n
  • traceCategories: A comma-separated string of Chromium tracing\ncategories for which trace events should be collected. An unspecified\nor empty string disables tracing.
  • \n
  • bufferUsageReportingInterval: The requested number of milliseconds\nbetween DevTools trace buffer usage events. For example, if 1000, then\nonce per second, DevTools will report how full the trace buffer is. If\na report indicates the buffer usage is 100%, a warning will be issued.
  • \n
"},{"title":"module:selenium-webdriver/chromium~Options#setUserPreferences","link":"setUserPreferences","description":"

Sets the user preferences for Chrome's user profile. See the "Preferences"\nfile in Chrome's user data directory for examples.

"},{"title":"module:selenium-webdriver/chromium~Options#windowSize","link":"windowSize","description":"

Sets the initial window size.

"},{"title":"module:selenium-webdriver/chromium~Options#windowTypes","link":"windowTypes","description":"

Sets a list of the window types that will appear when getting window\nhandles. For access to elements, include "webview" in the list.

"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder","link":"ServiceBuilder"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder#enableChromeLogging","link":"enableChromeLogging","description":"

Enables Chrome logging.

"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder#enableVerboseLogging","link":"enableVerboseLogging","description":"

Enables verbose logging.

"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder#loggingTo","link":"loggingTo","description":"

Sets the path of the log file the driver should log to. If a log file is\nnot specified, the driver will log to stderr.

"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder#setAdbPort","link":"setAdbPort","description":"

Sets which port adb is listening to. The driver will connect to adb\nif an {@linkplain Options#androidPackage Android session} is requested, but\nadb must be started beforehand.

"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder#setNumHttpThreads","link":"setNumHttpThreads","description":"

Sets the number of threads the driver should use to manage HTTP requests.\nBy default, the driver will use 4 threads.

"},{"title":"module:selenium-webdriver/chromium~ServiceBuilder#setPath","link":"setPath"},{"title":"module:selenium-webdriver/chromium~configureExecutor","link":"configureExecutor","description":"

Configures the given executor with Chromium-specific commands.

"},{"title":"module:selenium-webdriver/chromium~createExecutor","link":"createExecutor","description":"

Creates a command executor with support for Chromium's custom commands.

"},{"title":"module:selenium-webdriver/edge","link":"selenium-webdriver/edge","description":"

Defines a {@linkplain Driver WebDriver} client for\nMicrosoft's Edge web browser. Edge (Chromium) is supported and support\nfor Edge Legacy (EdgeHTML) as part of https://github.com/SeleniumHQ/selenium/issues/9166.\nBefore using this module, you must download and install the correct\nWebDriver server.

\n

Ensure that the msedgedriver (Chromium)\nis on your PATH.

\n

You may use {@link Options} to specify whether Edge Chromium options should be used:\nconst edge = require('selenium-webdriver/edge');\nconst options = new edge.Options();\nThere are three primary classes exported by this module:

\n
    \n
  1. \n

    {@linkplain ServiceBuilder}: configures the\n{@link ./remote.DriverService remote.DriverService}\nthat manages the [WebDriver] child process.

    \n
  2. \n
  3. \n

    {@linkplain Options}: defines configuration options for each new\nWebDriver session, such as which\n{@linkplain Options#setProxy proxy} to use when starting the browser.

    \n
  4. \n
  5. \n

    {@linkplain Driver}: the WebDriver client; each new instance will control\na unique browser session.

    \n
  6. \n
\n

Customizing the WebDriver Server

\n

By default, every MicrosoftEdge session will use a single driver service,\nwhich is started the first time a {@link Driver} instance is created and\nterminated when this process exits. The default service will inherit its\nenvironment from the current process.\nYou may obtain a handle to this default service using\n{@link #getDefaultService getDefaultService()} and change its configuration\nwith {@link #setDefaultService setDefaultService()}.

\n

You may also create a {@link Driver} with its own driver service. This is\nuseful if you need to capture the server's log output for a specific session:

\n
const edge = require('selenium-webdriver/edge');\n\nconst service = new edge.ServiceBuilder()\n    .setPort(55555)\n    .build();\n\nlet options = new edge.Options();\n// configure browser options ...\n\nlet driver = edge.Driver.createSession(options, service);\n
\n

Users should only instantiate the {@link Driver} class directly when they\nneed a custom driver service configuration (as shown above). For normal\noperation, users should start msedgedriver using the\n{@link ./builder.Builder selenium-webdriver.Builder}.

"},{"title":"module:selenium-webdriver/edge~Driver","link":"Driver"},{"title":"module:selenium-webdriver/edge~Driver#setFileDetector","link":"setFileDetector","description":"

This function is a no-op as file detectors are not supported by this\nimplementation.

"},{"title":"module:selenium-webdriver/edge~Driver.createSession","link":"createSession","description":"

Creates a new browser session for Microsoft's Edge browser.

"},{"title":"module:selenium-webdriver/edge~Driver.getDefaultService","link":"getDefaultService","description":"

returns new instance of edge driver service

"},{"title":"module:selenium-webdriver/edge~Options","link":"Options"},{"title":"module:selenium-webdriver/edge~Options#setEdgeChromiumBinaryPath","link":"setEdgeChromiumBinaryPath","description":"

Sets the path to the edge binary to use

\n

The binary path be absolute or relative to the msedgedriver server\nexecutable, but it must exist on the machine that will launch edge chromium.

"},{"title":"module:selenium-webdriver/edge~Options#useWebView","link":"useWebView","description":"

Changes the browser name to 'webview2' to enable\n\ntest automation of WebView2 apps with Microsoft Edge WebDriver\n

"},{"title":"module:selenium-webdriver/edge~ServiceBuilder","link":"ServiceBuilder"},{"title":"module:selenium-webdriver/firefox","link":"selenium-webdriver/firefox","description":"

Defines the {@linkplain Driver WebDriver} client for Firefox.\nBefore using this module, you must download the latest\ngeckodriver release and ensure it can be found on your system PATH.

\n

Each FirefoxDriver instance will be created with an anonymous profile,\nensuring browser historys do not share session data (cookies, history, cache,\noffline storage, etc.)

\n

Customizing the Firefox Profile

\n

The profile used for each WebDriver session may be configured using the\n{@linkplain Options} class. For example, you may install an extension, like\nFirebug:

\n
const {Builder} = require('selenium-webdriver');\nconst firefox = require('selenium-webdriver/firefox');\n\nlet options = new firefox.Options()\n    .addExtensions('/path/to/firebug.xpi')\n    .setPreference('extensions.firebug.showChromeErrors', true);\n\nlet driver = new Builder()\n    .forBrowser('firefox')\n    .setFirefoxOptions(options)\n    .build();\n
\n

The {@linkplain Options} class may also be used to configure WebDriver based\non a pre-existing browser profile:

\n
let profile = '/usr/local/home/bob/.mozilla/firefox/3fgog75h.testing';\nlet options = new firefox.Options().setProfile(profile);\n
\n

The FirefoxDriver will never modify a pre-existing profile; instead it will\ncreate a copy for it to modify. By extension, there are certain browser\npreferences that are required for WebDriver to function properly and they\nwill always be overwritten.

\n

Using a Custom Firefox Binary

\n

On Windows and MacOS, the FirefoxDriver will search for Firefox in its\ndefault installation location:

\n
    \n
  • Windows: C:\\Program Files and C:\\Program Files (x86).
  • \n
  • MacOS: /Applications/Firefox.app
  • \n
\n

For Linux, Firefox will always be located on the PATH: $(where firefox).

\n

You can provide a custom location for Firefox by setting the binary in the\n{@link Options}:setBinary method.

\n
const {Builder} = require('selenium-webdriver');\nconst firefox = require('selenium-webdriver/firefox');\n
\n

let options = new firefox.Options()\n.setBinary('/my/firefox/install/dir/firefox');\nlet driver = new Builder()\n.forBrowser('firefox')\n.setFirefoxOptions(options)\n.build();

\n

Remote Testing

\n

You may customize the Firefox binary and profile when running against a\nremote Selenium server. Your custom profile will be packaged as a zip and\ntransferred to the remote host for use. The profile will be transferred\nonce for each new session. The performance impact should be minimal if\nyou've only configured a few extra browser preferences. If you have a large\nprofile with several extensions, you should consider installing it on the\nremote host and defining its path via the {@link Options} class. Custom\nbinaries are never copied to remote machines and must be referenced by\ninstallation path.

\n
const {Builder} = require('selenium-webdriver');\nconst firefox = require('selenium-webdriver/firefox');\n\nlet options = new firefox.Options()\n    .setProfile('/profile/path/on/remote/host')\n    .setBinary('/install/dir/on/remote/host/firefox');\n\nlet driver = new Builder()\n    .forBrowser('firefox')\n    .usingServer('http://127.0.0.1:4444/wd/hub')\n    .setFirefoxOptions(options)\n    .build();\n
"},{"title":"module:selenium-webdriver/firefox~AddonFormatError","link":"AddonFormatError"},{"title":"module:selenium-webdriver/firefox~AddonFormatError#name","link":"name"},{"title":"module:selenium-webdriver/firefox~Channel","link":"Channel"},{"title":"module:selenium-webdriver/firefox~Channel#Symbols.serialize","link":"Symbols.serialize"},{"title":"module:selenium-webdriver/firefox~Channel#locate","link":"locate","description":"

Attempts to locate the Firefox executable for this release channel. This\nwill first check the default installation location for the channel before\nchecking the user's PATH. The returned promise will be rejected if Firefox\ncan not be found.

"},{"title":"module:selenium-webdriver/firefox~Channel.BETA","link":"BETA","description":"

Firefox's beta channel. Note this is provided mainly for convenience as\nthe beta channel has the same installation location as the main release\nchannel.

"},{"title":"module:selenium-webdriver/firefox~Channel.DEV","link":"DEV","description":"

Firefox's developer channel.

"},{"title":"module:selenium-webdriver/firefox~Channel.NIGHTLY","link":"NIGHTLY","description":"

Firefox's nightly release channel.

"},{"title":"module:selenium-webdriver/firefox~Channel.RELEASE","link":"RELEASE","description":"

Firefox's release channel.

"},{"title":"module:selenium-webdriver/firefox~Context","link":"Context","description":"

Enum of available command contexts.

\n

Command contexts are specific to Marionette, and may be used with the\n{@link #context=} method. Contexts allow you to direct all subsequent\ncommands to either "content" (default) or "chrome". The latter gives\nyou elevated security permissions.

"},{"title":"module:selenium-webdriver/firefox~Context.CHROME","link":"CHROME"},{"title":"module:selenium-webdriver/firefox~Context.CONTENT","link":"CONTENT"},{"title":"module:selenium-webdriver/firefox~Driver","link":"Driver"},{"title":"module:selenium-webdriver/firefox~Driver#getContext","link":"getContext","description":"

Get the context that is currently in effect.

"},{"title":"module:selenium-webdriver/firefox~Driver#installAddon","link":"installAddon","description":"

Installs a new addon with the current session. This function will return an\nID that may later be used to {@linkplain #uninstallAddon uninstall} the\naddon.

"},{"title":"module:selenium-webdriver/firefox~Driver#setContext","link":"setContext","description":"

Changes target context for commands between chrome- and content.

\n

Changing the current context has a stateful impact on all subsequent\ncommands. The {@link Context.CONTENT} context has normal web\nplatform document permissions, as if you would evaluate arbitrary\nJavaScript. The {@link Context.CHROME} context gets elevated\npermissions that lets you manipulate the browser chrome itself,\nwith full access to the XUL toolkit.

\n

Use your powers wisely.

"},{"title":"module:selenium-webdriver/firefox~Driver#setFileDetector","link":"setFileDetector","description":"

This function is a no-op as file detectors are not supported by this\nimplementation.

"},{"title":"module:selenium-webdriver/firefox~Driver#takeFullPageScreenshot","link":"takeFullPageScreenshot","description":"

Take full page screenshot of the visible region

"},{"title":"module:selenium-webdriver/firefox~Driver#uninstallAddon","link":"uninstallAddon","description":"

Uninstalls an addon from the current browser session's profile.

"},{"title":"module:selenium-webdriver/firefox~Driver.createSession","link":"createSession","description":"

Creates a new Firefox session.

"},{"title":"module:selenium-webdriver/firefox~ExtensionCommand","link":"ExtensionCommand"},{"title":"module:selenium-webdriver/firefox~ExtensionCommand.FULL_PAGE_SCREENSHOT","link":"FULL_PAGE_SCREENSHOT"},{"title":"module:selenium-webdriver/firefox~ExtensionCommand.GET_CONTEXT","link":"GET_CONTEXT"},{"title":"module:selenium-webdriver/firefox~ExtensionCommand.INSTALL_ADDON","link":"INSTALL_ADDON"},{"title":"module:selenium-webdriver/firefox~ExtensionCommand.SET_CONTEXT","link":"SET_CONTEXT"},{"title":"module:selenium-webdriver/firefox~ExtensionCommand.UNINSTALL_ADDON","link":"UNINSTALL_ADDON"},{"title":"module:selenium-webdriver/firefox~Options","link":"Options"},{"title":"module:selenium-webdriver/firefox~Options#addArguments","link":"addArguments","description":"

Specify additional command line arguments that should be used when starting\nthe Firefox browser.

"},{"title":"module:selenium-webdriver/firefox~Options#addExtensions","link":"addExtensions","description":"

Add extensions that should be installed when starting Firefox.

"},{"title":"module:selenium-webdriver/firefox~Options#enableBidi","link":"enableBidi","description":"

Enable bidi connection

"},{"title":"module:selenium-webdriver/firefox~Options#enableDebugger","link":"enableDebugger","description":"

Enables moz:debuggerAddress for firefox cdp

"},{"title":"module:selenium-webdriver/firefox~Options#enableMobile","link":"enableMobile","description":"

Enables Mobile start up features

"},{"title":"module:selenium-webdriver/firefox~Options#setBinary","link":"setBinary","description":"

Sets the binary to use. The binary may be specified as the path to a\nFirefox executable.

"},{"title":"module:selenium-webdriver/firefox~Options#setPreference","link":"setPreference"},{"title":"module:selenium-webdriver/firefox~Options#setProfile","link":"setProfile","description":"

Sets the path to an existing profile to use as a template for new browser\nsessions. This profile will be copied for each new session - changes will\nnot be applied to the profile itself.

"},{"title":"module:selenium-webdriver/firefox~Options#windowSize","link":"windowSize","description":"

Sets the initial window size

"},{"title":"module:selenium-webdriver/firefox~Profile#Symbols.serialize","link":"Symbols.serialize"},{"title":"module:selenium-webdriver/firefox~ServiceBuilder","link":"ServiceBuilder"},{"title":"module:selenium-webdriver/firefox~ServiceBuilder#enableVerboseLogging","link":"enableVerboseLogging","description":"

Enables verbose logging.

"},{"title":"module:selenium-webdriver/firefox~buildProfile","link":"buildProfile"},{"title":"module:selenium-webdriver/firefox~configureExecutor","link":"configureExecutor","description":"

Configures the given executor with Firefox-specific commands.

"},{"title":"module:selenium-webdriver/firefox~createExecutor","link":"createExecutor","description":"

Creates a command executor with support for Marionette's custom commands.

"},{"title":"module:selenium-webdriver/firefox~findInProgramFiles","link":"findInProgramFiles"},{"title":"module:selenium-webdriver/firefox~installExtension","link":"installExtension","description":"

Installs an extension to the given directory.

"},{"title":"module:selenium-webdriver/ie","link":"selenium-webdriver/ie","description":"

Defines a {@linkplain Driver WebDriver} client for Microsoft's\nInternet Explorer. Before using the IEDriver, you must download the latest\nIEDriverServer\nand place it on your\nPATH. You must also apply\nthe system configuration outlined on the Selenium project\nwiki

"},{"title":"module:selenium-webdriver/ie~Driver","link":"Driver"},{"title":"module:selenium-webdriver/ie~Driver#setFileDetector","link":"setFileDetector","description":"

This function is a no-op as file detectors are not supported by this\nimplementation.

"},{"title":"module:selenium-webdriver/ie~Driver.createSession","link":"createSession","description":"

Creates a new session for Microsoft's Internet Explorer.

"},{"title":"module:selenium-webdriver/ie~Key","link":"Key","description":"

Option keys:\nhttps://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities#ie-specific

"},{"title":"module:selenium-webdriver/ie~Key.ATTACH_TO_EDGE_CHROMIUM","link":"ATTACH_TO_EDGE_CHROMIUM"},{"title":"module:selenium-webdriver/ie~Key.BROWSER_ATTACH_TIMEOUT","link":"BROWSER_ATTACH_TIMEOUT"},{"title":"module:selenium-webdriver/ie~Key.BROWSER_COMMAND_LINE_SWITCHES","link":"BROWSER_COMMAND_LINE_SWITCHES"},{"title":"module:selenium-webdriver/ie~Key.EDGE_EXECUTABLE_PATH","link":"EDGE_EXECUTABLE_PATH"},{"title":"module:selenium-webdriver/ie~Key.ELEMENT_SCROLL_BEHAVIOR","link":"ELEMENT_SCROLL_BEHAVIOR"},{"title":"module:selenium-webdriver/ie~Key.ENABLE_ELEMENT_CACHE_CLEANUP","link":"ENABLE_ELEMENT_CACHE_CLEANUP"},{"title":"module:selenium-webdriver/ie~Key.ENABLE_PERSISTENT_HOVER","link":"ENABLE_PERSISTENT_HOVER"},{"title":"module:selenium-webdriver/ie~Key.ENSURE_CLEAN_SESSION","link":"ENSURE_CLEAN_SESSION"},{"title":"module:selenium-webdriver/ie~Key.EXTRACT_PATH","link":"EXTRACT_PATH"},{"title":"module:selenium-webdriver/ie~Key.FILE_UPLOAD_DIALOG_TIMEOUT","link":"FILE_UPLOAD_DIALOG_TIMEOUT"},{"title":"module:selenium-webdriver/ie~Key.FORCE_CREATE_PROCESS","link":"FORCE_CREATE_PROCESS"},{"title":"module:selenium-webdriver/ie~Key.HOST","link":"HOST"},{"title":"module:selenium-webdriver/ie~Key.IGNORE_PROCESS_MATCH","link":"IGNORE_PROCESS_MATCH"},{"title":"module:selenium-webdriver/ie~Key.IGNORE_PROTECTED_MODE_SETTINGS","link":"IGNORE_PROTECTED_MODE_SETTINGS"},{"title":"module:selenium-webdriver/ie~Key.IGNORE_ZOOM_SETTING","link":"IGNORE_ZOOM_SETTING"},{"title":"module:selenium-webdriver/ie~Key.INITIAL_BROWSER_URL","link":"INITIAL_BROWSER_URL"},{"title":"module:selenium-webdriver/ie~Key.LOG_FILE","link":"LOG_FILE"},{"title":"module:selenium-webdriver/ie~Key.LOG_LEVEL","link":"LOG_LEVEL"},{"title":"module:selenium-webdriver/ie~Key.REQUIRE_WINDOW_FOCUS","link":"REQUIRE_WINDOW_FOCUS"},{"title":"module:selenium-webdriver/ie~Key.SILENT","link":"SILENT"},{"title":"module:selenium-webdriver/ie~Key.USE_PER_PROCESS_PROXY","link":"USE_PER_PROCESS_PROXY"},{"title":"module:selenium-webdriver/ie~Level","link":"Level","description":"

IEDriverServer logging levels.

"},{"title":"module:selenium-webdriver/ie~Level.DEBUG","link":"DEBUG"},{"title":"module:selenium-webdriver/ie~Level.ERROR","link":"ERROR"},{"title":"module:selenium-webdriver/ie~Level.FATAL","link":"FATAL"},{"title":"module:selenium-webdriver/ie~Level.INFO","link":"INFO"},{"title":"module:selenium-webdriver/ie~Level.TRACE","link":"TRACE"},{"title":"module:selenium-webdriver/ie~Level.WARN","link":"WARN"},{"title":"module:selenium-webdriver/ie~Options","link":"Options"},{"title":"module:selenium-webdriver/ie~Options#addArguments","link":"addArguments","description":"

Specifies command-line switches to use when launching Internet Explorer.\nThis is only valid when used with {@link #forceCreateProcessApi}.

"},{"title":"module:selenium-webdriver/ie~Options#addBrowserCommandSwitches","link":"addBrowserCommandSwitches","description":"

Specifies command-line switches to use when launching Internet Explorer.\nThis is only valid when used with {@link #forceCreateProcessApi}.

"},{"title":"module:selenium-webdriver/ie~Options#browserAttachTimeout","link":"browserAttachTimeout","description":"

Configures the timeout, in milliseconds, that the driver will attempt to\nlocated and attach to a newly opened instance of Internet Explorer. The\ndefault is zero, which indicates waiting indefinitely.

"},{"title":"module:selenium-webdriver/ie~Options#enableElementCacheCleanup","link":"enableElementCacheCleanup","description":"

Configures whether the driver should attempt to remove obsolete\n{@linkplain webdriver.WebElement WebElements} from its internal cache on\npage navigation (true by default). Disabling this option will cause the\ndriver to run with a larger memory footprint.

"},{"title":"module:selenium-webdriver/ie~Options#enablePersistentHover","link":"enablePersistentHover","description":"

Configures whether to enable persistent mouse hovering (true by default).\nPersistent hovering is achieved by continuously firing mouse over events at\nthe last location the mouse cursor has been moved to.

"},{"title":"module:selenium-webdriver/ie~Options#ensureCleanSession","link":"ensureCleanSession","description":"

Configures whether to clear the cache, cookies, history, and saved form data\nbefore starting the browser. Using this capability will clear session data\nfor all running instances of Internet Explorer, including those started\nmanually.

"},{"title":"module:selenium-webdriver/ie~Options#fileUploadDialogTimeout","link":"fileUploadDialogTimeout","description":"

The options File Upload Dialog Timeout in milliseconds

"},{"title":"module:selenium-webdriver/ie~Options#forceCreateProcessApi","link":"forceCreateProcessApi","description":"

Configures whether to launch Internet Explorer using the CreateProcess API.\nIf this option is not specified, IE is launched using IELaunchURL, if\navailable. For IE 8 and above, this option requires the TabProcGrowth\nregistry value to be set to 0.

"},{"title":"module:selenium-webdriver/ie~Options#ignoreZoomSetting","link":"ignoreZoomSetting","description":"

Indicates whether to skip the check that the browser's zoom level is set to\n100%.

"},{"title":"module:selenium-webdriver/ie~Options#initialBrowserUrl","link":"initialBrowserUrl","description":"

Sets the initial URL loaded when IE starts. This is intended to be used with\n{@link #introduceFlakinessByIgnoringProtectedModeSettings} to allow the user to initialize IE in\nthe proper Protected Mode zone. Setting this option may cause browser\ninstability or flaky and unresponsive code. Only "best effort" support is\nprovided when using this option.

"},{"title":"module:selenium-webdriver/ie~Options#introduceFlakinessByIgnoringProtectedModeSettings","link":"introduceFlakinessByIgnoringProtectedModeSettings","description":"

Whether to disable the protected mode settings check when the session is\ncreated. Disabling this setting may lead to significant instability as the\nbrowser may become unresponsive/hang. Only "best effort" support is provided\nwhen using this capability.

\n

For more information, refer to the IEDriver's\nrequired system configuration.

"},{"title":"module:selenium-webdriver/ie~Options#requireWindowFocus","link":"requireWindowFocus","description":"

Configures whether to require the IE window to have input focus before\nperforming any user interactions (i.e. mouse or keyboard events). This\noption is disabled by default, but delivers much more accurate interaction\nevents when enabled.

"},{"title":"module:selenium-webdriver/ie~Options#setEdgeChromium","link":"setEdgeChromium","description":"

Sets the IEDriver to drive Chromium-based Edge in Internet Explorer mode.

"},{"title":"module:selenium-webdriver/ie~Options#setEdgePath","link":"setEdgePath","description":"

Sets the path of the EdgeChromium driver.

"},{"title":"module:selenium-webdriver/ie~Options#setExtractPath","link":"setExtractPath","description":"

Sets the path of the temporary data directory to use.

"},{"title":"module:selenium-webdriver/ie~Options#setHost","link":"setHost","description":"

Sets the IP address of the driver's host adapter.

"},{"title":"module:selenium-webdriver/ie~Options#setLogFile","link":"setLogFile","description":"

Sets the path to the log file the driver should log to.

"},{"title":"module:selenium-webdriver/ie~Options#setLogLevel","link":"setLogLevel","description":"

Sets the IEDriverServer's logging {@linkplain Level level}.

"},{"title":"module:selenium-webdriver/ie~Options#setScrollBehavior","link":"setScrollBehavior","description":"

Sets how elements should be scrolled into view for interaction.

"},{"title":"module:selenium-webdriver/ie~Options#silent","link":"silent","description":"

Sets whether the driver should start in silent mode.

"},{"title":"module:selenium-webdriver/ie~Options#usePerProcessProxy","link":"usePerProcessProxy","description":"

Configures whether proxies should be configured on a per-process basis. If\nnot set, setting a {@linkplain #setProxy proxy} will configure the system\nproxy. The default behavior is to use the system proxy.

"},{"title":"module:selenium-webdriver/ie~ServiceBuilder","link":"ServiceBuilder"},{"title":"module:selenium-webdriver/safari","link":"selenium-webdriver/safari","description":"

Defines a WebDriver client for Safari.

"},{"title":"module:selenium-webdriver/safari~Driver","link":"Driver"},{"title":"module:selenium-webdriver/safari~Driver.createSession","link":"createSession","description":"

Creates a new Safari session.

"},{"title":"module:selenium-webdriver/safari~Options","link":"Options"},{"title":"module:selenium-webdriver/safari~Options#enableLogging","link":"enableLogging","description":"

Enables diagnostic logging for Safari.

\n

This method sets the safari:diagnose option to true in the current configuration.\nIt is used to enable additional logging or diagnostic features specific to Safari.

"},{"title":"module:selenium-webdriver/safari~Options#setTechnologyPreview","link":"setTechnologyPreview","description":"

Instruct the SafariDriver to use the Safari Technology Preview if true.\nOtherwise, use the release version of Safari. Defaults to using the release version of Safari.

"},{"title":"module:selenium-webdriver/safari~ServiceBuilder","link":"ServiceBuilder"},{"title":"module:selenium-webdriver/safari~useTechnologyPreview","link":"useTechnologyPreview"},{"title":"of","link":"of","description":"

Creates a build of the listed targets.

"},{"title":"pac","link":"pac","description":"

Configures WebDriver to configure the browser proxy using the PAC file at\nthe given URL.

"},{"title":"pad","link":"pad","description":"

Pads a number to ensure it has a minimum of two digits.

"},{"title":"parseHttpResponse","link":"parseHttpResponse","description":"

Callback used to parse {@link Response} objects from a\n{@link HttpClient}.

"},{"title":"path","link":"path","description":"

This implementation is still in beta, and may change.

\n

Utility to find if a given file is present and executable.

"},{"title":"projectRoot","link":"projectRoot"},{"title":"proxy.js","link":"proxy.js","description":"

Proxy module alias.

\n
var webdriver = require('selenium-webdriver'),\n    proxy = require('selenium-webdriver/proxy');\n\nvar driver = new webdriver.Builder()\n    .withCapabilities(webdriver.Capabilities.chrome())\n    .setProxy(proxy.manual({http: 'host:1234'}))\n    .build();\n
"},{"title":"read","link":"read","description":"

Reads the contents of the given file.

"},{"title":"removeConsoleHandler","link":"removeConsoleHandler","description":"

Removes the console log handler from the given logger.

"},{"title":"requireAtom","link":"requireAtom"},{"title":"resolveCommandLineFlags","link":"resolveCommandLineFlags"},{"title":"resolveWaitMessage","link":"resolveWaitMessage","description":"

Resolves a wait message from either a function or a string.

"},{"title":"rmDir","link":"rmDir","description":"

Recursively removes a directory and all of its contents. This is equivalent\nto {@code rm -rf} on a POSIX system.

"},{"title":"sendIndex","link":"sendIndex","description":"

Responds to a request for the file server's main index.

"},{"title":"sendRequest","link":"sendRequest","description":"

Sends a single HTTP request.

"},{"title":"serialize","link":"serialize","description":"

Serializes a capabilities object. This is defined as a standalone function\nso it may be type checked (where Capabilities[Symbols.serialize] has type\nchecking disabled since it is defined with [] access on a struct).

"},{"title":"setFileDetector","link":"setFileDetector"},{"title":"shouldRetryRequest","link":"shouldRetryRequest","description":"

A retry is sometimes needed on Windows where we may quickly run out of\nephemeral ports. A more robust solution is bumping the MaxUserPort setting\nas described here: http://msdn.microsoft.com/en-us/library/aa560610%28v=bts.20%29.aspx

"},{"title":"socks","link":"socks","description":"

Creates a proxy configuration for a socks proxy.

\n

Example:

\n
const {Capabilities} = require('selenium-webdriver');\nconst proxy = require('selenium-webdriver/lib/proxy');\n\nlet capabilities = new Capabilities();\ncapabilities.setProxy(proxy.socks('localhost:1234'));\n\n// Or, to include authentication.\ncapabilities.setProxy(proxy.socks('bob:password@localhost:1234'));\n
"},{"title":"splitHostAndPort","link":"splitHostAndPort","description":"

Splits a hostport string, e.g. "www.example.com:80", into its component\nparts.

"},{"title":"stalenessOf","link":"stalenessOf","description":"

Creates a condition that will wait for the given element to become stale. An\nelement is considered stale once it is removed from the DOM, or a new page\nhas loaded.

"},{"title":"start","link":"start","description":"

Starts the server on the specified port.

"},{"title":"startSeleniumServer","link":"startSeleniumServer","description":"

Starts an instance of the Selenium server if not yet running.

"},{"title":"stat","link":"stat","description":"

Calls stat(2).

"},{"title":"stop","link":"stop","description":"

Stops the server.

"},{"title":"suite","link":"suite"},{"title":"suite","link":"suite","description":"

Defines a test suite by calling the provided function once for each of the\ntarget browsers. If a suite is not limited to a specific set of browsers in\nthe provided {@linkplain ./index.SuiteOptions suite options}, the suite will\nbe configured to run against each of the {@linkplain ./index.init runtime\ntarget browsers}.

\n

Sample usage:

\n
const {By, Key, until} = require('selenium-webdriver');\nconst {suite} = require('selenium-webdriver/testing');\n\nsuite(function(env) {\n  describe('Google Search', function() {\n    let driver;\n\n    before(async function() {\n      driver = await env.builder().build();\n    });\n\n    after(() => driver.quit());\n\n    it('demo', async function() {\n      await driver.get('http://www.google.com/ncr');\n\n      let q = await driver.findElement(By.name('q'));\n      await q.sendKeys('webdriver', Key.RETURN);\n      await driver.wait(\n          until.titleIs('webdriver - Google Search'), 1000);\n    });\n  });\n});\n
\n

By default, this example suite will run against every WebDriver-enabled\nbrowser on the current system. Alternatively, the SELENIUM_BROWSER\nenvironment variable may be used to run against a specific browser:

\n
SELENIUM_BROWSER=firefox mocha -t 120000 example_test.js\n
"},{"title":"system","link":"system","description":"

Configures WebDriver to use the current system's proxy.

"},{"title":"testing/index.js","link":"testing/index.js","description":"

Provides extensions for\nJasmine and Mocha.

\n

You may conditionally suppress a test function using the exported\n"ignore" function. If the provided predicate returns true, the attached\ntest case will be skipped:

\n
test.ignore(maybe()).it('is flaky', function() {\n  if (Math.random() < 0.5) throw Error();\n});\n\nfunction maybe() { return Math.random() < 0.5; }\n
"},{"title":"thenFinally","link":"thenFinally","description":"

Registers a listener to invoke when a promise is resolved, regardless\nof whether the promise's value was successfully computed. This function\nis synonymous with the {@code finally} clause in a synchronous API:

\n
// Synchronous API:\ntry {\n  doSynchronousWork();\n} finally {\n  cleanUp();\n}\n\n// Asynchronous promise API:\ndoAsynchronousWork().finally(cleanUp);\n
\n

Note: similar to the {@code finally} clause, if the registered\ncallback returns a rejected promise or throws an error, it will silently\nreplace the rejection error (if any) from this promise:

\n
try {\n  throw Error('one');\n} finally {\n  throw Error('two');  // Hides Error: one\n}\n\nlet p = Promise.reject(Error('one'));\npromise.finally(p, function() {\n  throw Error('two');  // Hides Error: one\n});\n
"},{"title":"throwDecodedError","link":"throwDecodedError","description":"

Throws an error coded from the W3C protocol. A generic error will be thrown\nif the provided data is not a valid encoded error.

"},{"title":"titleContains","link":"titleContains","description":"

Creates a condition that will wait for the current page's title to contain\nthe given substring.

"},{"title":"titleIs","link":"titleIs","description":"

Creates a condition that will wait for the current page's title to match the\ngiven value.

"},{"title":"titleMatches","link":"titleMatches","description":"

Creates a condition that will wait for the current page's title to match the\ngiven regular expression.

"},{"title":"tmpDir","link":"tmpDir"},{"title":"tmpFile","link":"tmpFile"},{"title":"toExecuteAtomCommand","link":"toExecuteAtomCommand"},{"title":"toMap","link":"toMap","description":"

Converts a generic hash object to a map.

"},{"title":"toWireValue","link":"toWireValue","description":"

Converts an object to its JSON representation in the WebDriver wire protocol.\nWhen converting values of type object, the following steps will be taken:

\n
    \n
  1. if the object is a WebElement, the return value will be the element's\n server ID\n
  2. if the object defines a {@link Symbols.serialize} method, this algorithm\n will be recursively applied to the object's serialized representation\n
  3. if the object provides a \"toJSON\" function, this algorithm will\n recursively be applied to the result of that function\n
  4. otherwise, the value of each key will be recursively converted according\n to the rules above.\n
"},{"title":"tryParse","link":"tryParse"},{"title":"unlink","link":"unlink","description":"

Deletes a name from the filesystem and possibly the file it refers to. Has\nno effect if the file does not exist.

"},{"title":"unzip","link":"unzip","description":"

Asynchronously unzips an archive file.

"},{"title":"url","link":"url","description":"

Formats a URL for this server.

"},{"title":"urlContains","link":"urlContains","description":"

Creates a condition that will wait for the current page's url to contain\nthe given substring.

"},{"title":"urlIs","link":"urlIs","description":"

Creates a condition that will wait for the current page's url to match the\ngiven value.

"},{"title":"urlMatches","link":"urlMatches","description":"

Creates a condition that will wait for the current page's url to match the\ngiven regular expression.

"},{"title":"value.sessionId","link":"sessionId"},{"title":"waitForServer","link":"waitForServer","description":"

Waits for a WebDriver server to be healthy and accepting requests.

"},{"title":"waitForUrl","link":"waitForUrl","description":"

Polls a URL with GET requests until it returns a 2xx response or the\ntimeout expires.

"},{"title":"walkDir","link":"walkDir","description":"

Recursively walks a directory, returning a promise that will resolve with\na list of all files/directories seen.

"},{"title":"whereIs","link":"whereIs","description":"

Builds the URL for a file in the //common/src/web directory of the\nSelenium client.

"},{"title":"withTagName","link":"withTagName","description":"

Start Searching for relative objects using the value returned from\nBy.tagName().

\n

Note: this method will likely be removed in the future please use\nlocateWith.

"},{"title":"write","link":"write","description":"

Writes to a file.

"}]} \ No newline at end of file diff --git a/docs/api/javascript/devtools_networkinterceptor.js.html b/docs/api/javascript/devtools_networkinterceptor.js.html index cfd1768bb43d3..ab26c0a4682fe 100644 --- a/docs/api/javascript/devtools_networkinterceptor.js.html +++ b/docs/api/javascript/devtools_networkinterceptor.js.html @@ -1,6 +1,6 @@ Source: devtools/networkinterceptor.js
On this page

devtools_networkinterceptor.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

devtools_networkinterceptor.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -89,4 +89,4 @@
 }
 
 exports.HttpResponse = HttpResponse
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/edge.js.html b/docs/api/javascript/edge.js.html index ec49f05d440b1..4198a17ce1490 100644 --- a/docs/api/javascript/edge.js.html +++ b/docs/api/javascript/edge.js.html @@ -1,6 +1,6 @@ Source: edge.js
On this page

edge.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

edge.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -180,4 +180,4 @@
   Options,
   ServiceBuilder,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/firefox.js.html b/docs/api/javascript/firefox.js.html index aad7779391e20..8aae49a115983 100644 --- a/docs/api/javascript/firefox.js.html +++ b/docs/api/javascript/firefox.js.html @@ -1,6 +1,6 @@ Source: firefox.js
On this page

firefox.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

firefox.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -776,4 +776,4 @@
   Options,
   ServiceBuilder,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/global.html b/docs/api/javascript/global.html index 8b7a4933f8dd8..9c3578e7087aa 100644 --- a/docs/api/javascript/global.html +++ b/docs/api/javascript/global.html @@ -1,6 +1,6 @@ Global
On this page

Members

(constant, non-null) Atom :function

Type:
  • function
Properties
NameTypeDescription
GET_ATTRIBUTEfunction
IS_DISPLAYEDfunction
FIND_ELEMENTSfunction

(constant) Browser :string

Recognized browser names.

Type:
  • string
Properties
NameTypeDescription
CHROMEstring
EDGEstring
FIREFOXstring
INTERNET_EXPLORERstring
SAFARIstring

(constant) Button :number

Enumeration of the buttons used in the advanced interactions API.

Type:
  • number
Properties
NameTypeDescription
LEFTnumber
MIDDLEnumber
RIGHTnumber
BACKnumber
FORWARDnumber

(constant) Capability :string

The standard WebDriver capability keys.

Type:
  • string
Properties
NameTypeDescription
ACCEPT_INSECURE_TLS_CERTSstring

Indicates whether a WebDriver session implicitly trusts otherwise untrusted and self-signed TLS certificates during navigation.

BROWSER_NAMEstring

The browser name. Common browser names are defined in the Browser enum.

BROWSER_VERSIONstring

Identifies the browser version.

LOGGING_PREFSstring

Key for the logging driver logging preferences. The browser name. Common browser names are defined in the Browser enum.

PAGE_LOAD_STRATEGYstring

Defines the session's page loading strategy.

PLATFORM_NAMEstring

Identifies the operating system of the endpoint node. Common values recognized by the most WebDriver server implementations are predefined in the Platform enum.

PROXYstring

Describes the proxy configuration to use for a new WebDriver session.

SET_WINDOW_RECTstring

Indicates whether the remote end supports all of the window resizing and positioning commands:

  • Window.getRect()
  • Window.setRect()
  • Window.maximize()
  • Window.minimize()
  • Window.fullscreen()
TIMEOUTSstring

Describes the timeouts imposed on certain session operations.

UNHANDLED_PROMPT_BEHAVIORstring

Defines how a WebDriver session should respond to unhandled user prompts.

STRICT_FILE_INTERACTABILITYstring

Defines the current session’s strict file interactability. Used to upload a file when strict file interactability is on

ENABLE_DOWNLOADSstring

(constant) Config

(constant) ErrorCode :number

Enum of legacy error codes. TODO: remove this when all code paths have been switched to the new error types.

Type:
  • number
Properties
NameTypeDescription
SUCCESSnumber
NO_SUCH_SESSIONnumber
NO_SUCH_ELEMENTnumber
NO_SUCH_FRAMEnumber
UNKNOWN_COMMANDnumber
UNSUPPORTED_OPERATIONnumber
STALE_ELEMENT_REFERENCEnumber
ELEMENT_NOT_VISIBLEnumber
INVALID_ELEMENT_STATEnumber
UNKNOWN_ERRORnumber
ELEMENT_NOT_SELECTABLEnumber
JAVASCRIPT_ERRORnumber
XPATH_LOOKUP_ERRORnumber
TIMEOUTnumber
NO_SUCH_WINDOWnumber
INVALID_COOKIE_DOMAINnumber
UNABLE_TO_SET_COOKIEnumber
UNEXPECTED_ALERT_OPENnumber
NO_SUCH_ALERTnumber
SCRIPT_TIMEOUTnumber
INVALID_ELEMENT_COORDINATESnumber
IME_NOT_AVAILABLEnumber
IME_ENGINE_ACTIVATION_FAILEDnumber
INVALID_SELECTOR_ERRORnumber
SESSION_NOT_CREATEDnumber
MOVE_TARGET_OUT_OF_BOUNDSnumber
SQL_DATABASE_ERRORnumber
INVALID_XPATH_SELECTORnumber
INVALID_XPATH_SELECTOR_RETURN_TYPEnumber
ELEMENT_NOT_INTERACTABLEnumber
INVALID_ARGUMENTnumber
NO_SUCH_COOKIEnumber
UNABLE_TO_CAPTURE_SCREENnumber
ELEMENT_CLICK_INTERCEPTEDnumber
METHOD_NOT_ALLOWEDnumber
Deprecated
  • Yes

(constant) EvaluateResultType :string

Represents the type of script evaluation result. Described in https://w3c.github.io/webdriver-bidi/#type-script-EvaluateResult.

Type:
  • string
Properties
NameTypeDescription
SUCCESSstring
EXCEPTIONstring

(package, constant) INTERNAL_COMPUTE_OFFSET_SCRIPT

Script used to compute the offset from the center of a DOM element's first client rect from the top-left corner of the element's bounding client rect. The element's center point is computed using the algorithm defined here: https://w3c.github.io/webdriver/webdriver-spec.html#dfn-center-point.

This is only exported for use in internal unit tests. DO NOT USE.

(constant) InterceptPhase :string

Represents the different phases of intercepting network requests and responses.

Type:
  • string
Properties
NameTypeDescription
BEFORE_REQUEST_SENTstring
RESPONSE_STARTEDstring
AUTH_REQUIREDstring

(constant) Key :string

Representations of pressable keys that aren't text. These are stored in the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to http://www.google.com.au/search?&q=unicode+pua&btnK=Search

Type:
  • string
Properties
NameTypeDescription
NULLstring
CANCELstring
HELPstring
BACK_SPACEstring
TABstring
CLEARstring
RETURNstring
ENTERstring
SHIFTstring
CONTROLstring
ALTstring
PAUSEstring
ESCAPEstring
SPACEstring
PAGE_UPstring
PAGE_DOWNstring
ENDstring
HOMEstring
ARROW_LEFTstring
LEFTstring
ARROW_UPstring
UPstring
ARROW_RIGHTstring
RIGHTstring
ARROW_DOWNstring
DOWNstring
INSERTstring
DELETEstring
SEMICOLONstring
EQUALSstring
NUMPAD0string
NUMPAD1string
NUMPAD2string
NUMPAD3string
NUMPAD4string
NUMPAD5string
NUMPAD6string
NUMPAD7string
NUMPAD8string
NUMPAD9string
MULTIPLYstring
ADDstring
SEPARATORstring
SUBTRACTstring
DECIMALstring
DIVIDEstring
F1string
F2string
F3string
F4string
F5string
F6string
F7string
F8string
F9string
F10string
F11string
F12string
COMMANDstring
METAstring
ZENKAKU_HANKAKUstring

Japanese modifier key for switching between full- and half-width characters.

(constant) ManualConfig

(constant) Name :string

Enumeration of predefined names command names that all command processors will support.

Type:
  • string
Properties
NameTypeDescription
GET_SERVER_STATUSstring
NEW_SESSIONstring
GET_SESSIONSstring
CLOSEstring
QUITstring
GET_CURRENT_URLstring
GETstring
GO_BACKstring
GO_FORWARDstring
REFRESHstring
ADD_COOKIEstring
GET_COOKIEstring
GET_ALL_COOKIESstring
DELETE_COOKIEstring
DELETE_ALL_COOKIESstring
GET_ACTIVE_ELEMENTstring
FIND_ELEMENTstring
FIND_ELEMENTSstring
FIND_ELEMENTS_RELATIVEstring
FIND_CHILD_ELEMENTstring
FIND_CHILD_ELEMENTSstring
CLEAR_ELEMENTstring
CLICK_ELEMENTstring
SEND_KEYS_TO_ELEMENTstring
GET_CURRENT_WINDOW_HANDLEstring
GET_WINDOW_HANDLESstring
GET_WINDOW_RECTstring
SET_WINDOW_RECTstring
MAXIMIZE_WINDOWstring
MINIMIZE_WINDOWstring
FULLSCREEN_WINDOWstring
SWITCH_TO_WINDOWstring
SWITCH_TO_NEW_WINDOWstring
SWITCH_TO_FRAMEstring
SWITCH_TO_FRAME_PARENTstring
GET_PAGE_SOURCEstring
GET_TITLEstring
EXECUTE_SCRIPTstring
EXECUTE_ASYNC_SCRIPTstring
GET_ELEMENT_TEXTstring
GET_COMPUTED_ROLEstring
GET_COMPUTED_LABELstring
GET_ELEMENT_TAG_NAMEstring
IS_ELEMENT_SELECTEDstring
IS_ELEMENT_ENABLEDstring
IS_ELEMENT_DISPLAYEDstring
GET_ELEMENT_RECTstring
GET_ELEMENT_ATTRIBUTEstring
GET_DOM_ATTRIBUTEstring
GET_ELEMENT_VALUE_OF_CSS_PROPERTYstring
GET_ELEMENT_PROPERTYstring
SCREENSHOTstring
TAKE_ELEMENT_SCREENSHOTstring
PRINT_PAGEstring
GET_TIMEOUTstring
SET_TIMEOUTstring
ACCEPT_ALERTstring
DISMISS_ALERTstring
GET_ALERT_TEXTstring
SET_ALERT_TEXTstring
GET_SHADOW_ROOTstring
FIND_ELEMENT_FROM_SHADOWROOTstring
FIND_ELEMENTS_FROM_SHADOWROOTstring
ADD_VIRTUAL_AUTHENTICATORstring
REMOVE_VIRTUAL_AUTHENTICATORstring
ADD_CREDENTIALstring
GET_CREDENTIALSstring
REMOVE_CREDENTIALstring
REMOVE_ALL_CREDENTIALSstring
SET_USER_VERIFIEDstring
GET_AVAILABLE_LOG_TYPESstring
GET_LOGstring
UPLOAD_FILEstring
ACTIONSstring
CLEAR_ACTIONSstring
GET_DOWNLOADABLE_FILESstring
DOWNLOAD_FILEstring
DELETE_DOWNLOADABLE_FILESstring
CANCEL_DIALOGstring
SELECT_ACCOUNTstring
GET_ACCOUNTSstring
GET_FEDCM_TITLEstring
GET_FEDCM_DIALOG_TYPEstring
SET_DELAY_ENABLEDstring
RESET_COOLDOWNstring
CLICK_DIALOG_BUTTONstring

(constant) NonPrimitiveType

Represents a non-primitive type.

Properties
NameTypeDescription
ARRAY
DATE
MAP
OBJECT
REGULAR_EXPRESSION
SET
CHANNEL
findByName

(constant) Origin :string

Defines the reference point from which to compute offsets for capturing screenshot.

Type:
  • string
Properties
NameTypeDescription
VIEWPORTstring
DOCUMENTstring

(constant) Origin :string

Defines the reference point from which to compute offsets for pointer move actions.

Type:
  • string
Properties
NameTypeDescription
POINTERstring

Compute offsets relative to the pointer's current position.

VIEWPORTstring

Compute offsets relative to the viewport.

(constant) PacConfig

(constant) PageLoadStrategy :string

Strategies for waiting for document readiness after a navigation event.

Type:
  • string
Properties
NameTypeDescription
NONEstring

Indicates WebDriver should not wait on the document readiness state after a navigation event.

EAGERstring

Indicates WebDriver should wait for the document readiness state to become "interactive" after navigation.

NORMALstring

Indicates WebDriver should wait for the document readiness state to be "complete" after navigation. This is the default page loading strategy.

(constant) Platform :string

Common platform names. These platforms are not explicitly defined by the WebDriver spec, however, their use is encouraged for interoperability.

Type:
  • string
Properties
NameTypeDescription
LINUXstring
MACstring
WINDOWSstring

(constant) PrimitiveType

Represents a primitive type.

Properties
NameTypeDescription
UNDEFINED
NULL
STRING
NUMBER
SPECIAL_NUMBER
BOOLEAN
BIGINT
findByName

(constant) Protocol :string

Protocol for virtual authenticators

Type:
  • string
Properties
NameTypeDescription
CTAP2string
U2Fstring

(constant) RealmType

Represents the types of realms. Described in https://w3c.github.io/webdriver-bidi/#type-script-RealmType.

Properties
NameTypeDescription
AUDIO_WORKLET
DEDICATED_WORKER
PAINT_WORKLET
SERVICE_WORKED
SHARED_WORKED
WINDOW
WORKER
WORKLET
findByName

(constant) RemoteReferenceType :string

Represents the types of remote reference.

Type:
  • string
Properties
NameTypeDescription
HANDLEstring
SHARED_IDstring

(constant) RemoteType

Represents a remote value type.

Properties
NameTypeDescription
SYMBOL
FUNCTION
WEAK_MAP
WEAK_SET
ITERATOR
GENERATOR
ERROR
PROXY
PROMISE
TYPED_ARRAY
ARRAY_BUFFER
NODE_LIST
HTML_COLLECTION
NODE
WINDOW
findByName

(constant) ResultOwnership :string

Enum representing the ownership types.

Type:
  • string
Properties
NameTypeDescription
ROOTstring
NONEstring

(constant) SameSite :string

Represents the possible values for the SameSite attribute of a cookie.

Type:
  • string
Properties
NameTypeDescription
STRICTstring
LAXstring
NONEstring
findByNamestring

(constant) SpecialNumberType

Represents a speacial number type.

Properties
NameTypeDescription
NAN
MINUS_ZERO
INFINITY
MINUS_INFINITY

(constant, non-null) THENABLE_DRIVERS :Map.<function(new:WebDriver, !IThenable.<!Session>, ...?), function(new:ThenableWebDriver, !IThenable.<!Session>, ...?)>

Type:

(constant) Transport :string

AuthenticatorTransport values

Type:
  • string
Properties
NameTypeDescription
BLEstring
USBstring
NFCstring
INTERNALstring

(constant) Type :string

Represents the types of partition descriptors.

Type:
  • string
Properties
NameTypeDescription
CONTEXTstring
STORAGE_KEYstring

(constant) Type :string

Common log types.

Type:
  • string
Properties
NameTypeDescription
BROWSERstring

Logs originating from the browser.

CLIENTstring

Logs from a WebDriver client.

DRIVERstring

Logs from a WebDriver implementation.

PERFORMANCEstring

Logs related to performance.

SERVERstring

Logs from the remote server.

(constant) Type :string

Supported proxy configuration types.

Type:
  • string
Properties
NameTypeDescription
AUTODETECTstring
DIRECTstring
MANUALstring
PACstring
SYSTEMstring

(constant) Type

(constant) USER_AGENT :string

Type:
  • string

(constant) UserPromptHandler :string

The possible default actions a WebDriver session can take to respond to unhandled user prompts (window.alert(), window.confirm(), and window.prompt()).

Type:
  • string
Properties
NameTypeDescription
ACCEPTstring

All prompts should be silently accepted.

DISMISSstring

All prompts should be silently dismissed.

ACCEPT_AND_NOTIFYstring

All prompts should be automatically accepted, but an error should be returned to the next (or currently executing) WebDriver command.

DISMISS_AND_NOTIFYstring

All prompts should be automatically dismissed, but an error should be returned to the next (or currently executing) WebDriver command.

IGNOREstring

All prompts should be left unhandled.

(constant, non-null) W3C_COMMAND_MAP :Map.<string, (CommandSpec|CommandTransformer)>

Type:

(non-null) builtTargets :Object

Targets that have been previously built.

Type:
  • Object

(constant) path

This implementation is still in beta, and may change.

Utility to find if a given file is present and executable.

start

Starts the server on the specified port.

stop

Stops the server.

url

Formats a URL for this server.

Methods

ableToSwitchToFrame(frame) → (non-null) {Condition.<boolean>}

Creates a condition that will wait until the input driver is able to switch to the designated frame. The target frame may be specified as

  1. a numeric index into window.frames for the currently selected frame.
  2. a ./webdriver.WebElement, which must reference a FRAME or IFRAME element on the current page.
  3. a locator which may be used to first locate a FRAME or IFRAME on the current page before attempting to switch to it.

Upon successful resolution of this condition, the driver will be left focused on the new frame.

Parameters:
NameTypeDescription
frame
Returns:

A new condition.

Type: 
Condition.<boolean>

addConsoleHandler(opt_loggeropt)

Adds the console handler to the given logger. The console handler will log all messages using the JavaScript Console API.

Parameters:
NameTypeAttributesDescription
opt_loggerLogger<optional>

The logger to add the handler to; defaults to the root logger.

alertIsPresent()

Creates a condition that waits for an alert to be opened. Upon success, the returned promise will be fulfilled with the handle for the opened alert.

Returns:

arraysEqual(array1, array2)

Checks if the two arrays are equal or not. Conditions to check are:

  1. If the length of both arrays is equal
  2. If all elements of array1 are present in array2
  3. If all elements of array2 are present in array1
Parameters:
NameTypeDescription
array1

First array to be checked for equality

array2

Second array to be checked for equality

Returns:

true if equal, otherwise false.

binaryPaths(args) → {Object}

Determines the path of the correct driver

Parameters:
NameTypeDescription
argsArray.<string>

arguments to invoke Selenium Manager

Returns:

path of the driver and browser location

Type: 
Object

buildPath(path, parametersnon-null) → {string}

Builds a fully qualified path using the given set of command parameters. Each path segment prefixed with ':' will be replaced by the value of the corresponding parameter. All parameters spliced into the path will be removed from the parameter map.

Parameters:
NameTypeDescription
pathstring

The original resource path.

parametersObject.<*>

The parameters object to splice into the path.

Returns:

The modified path.

Type: 
string

buildRequest(customCommands, commandnon-null) → (non-null) {Request}

Parameters:
NameTypeDescription
customCommandsMap.<string, CommandSpec>

A map of custom command definitions.

commandcmd.Command

The command to resolve.

Returns:

A promise that will resolve with the command to execute.

Type: 
Request

check(locatornon-null) → (non-null) {By|function}

Checks if a value is a valid locator.

Parameters:
NameTypeDescription
locatorBy | function | ByHash

The value to check.

Throws:

If the given value does not define a valid locator strategy.

Type
TypeError
Returns:

The valid locator.

Type: 
By | function

checkCodePoint(key) → {string}

Parameters:
NameTypeDescription
keystring | Key | number
Throws:
Returns:
Type: 
string

checkLegacyResponse(responseObj) → {*}

Checks a legacy response from the Selenium 2.0 wire protocol for an error.

Parameters:
NameTypeDescription
responseObj*

the response object to check.

Throws:

if the response object defines an error.

Type
WebDriverError
Returns:

responseObj the original response if it does not define an error.

Type: 
*

checkOptions(capsnon-null, key, optionType, setMethod)

In the 3.x releases, the various browser option classes (e.g. firefox.Options) had to be manually set as an option using the Capabilities class:

let ffo = new firefox.Options();
+    
On this page

Members

(constant, non-null) Atom :function

Type:
  • function
Properties
NameTypeDescription
GET_ATTRIBUTEfunction
IS_DISPLAYEDfunction
FIND_ELEMENTSfunction

(constant) Browser :string

Recognized browser names.

Type:
  • string
Properties
NameTypeDescription
CHROMEstring
EDGEstring
FIREFOXstring
INTERNET_EXPLORERstring
SAFARIstring

(constant) Button :number

Enumeration of the buttons used in the advanced interactions API.

Type:
  • number
Properties
NameTypeDescription
LEFTnumber
MIDDLEnumber
RIGHTnumber
BACKnumber
FORWARDnumber

(constant) Capability :string

The standard WebDriver capability keys.

Type:
  • string
Properties
NameTypeDescription
ACCEPT_INSECURE_TLS_CERTSstring

Indicates whether a WebDriver session implicitly trusts otherwise untrusted and self-signed TLS certificates during navigation.

BROWSER_NAMEstring

The browser name. Common browser names are defined in the Browser enum.

BROWSER_VERSIONstring

Identifies the browser version.

LOGGING_PREFSstring

Key for the logging driver logging preferences. The browser name. Common browser names are defined in the Browser enum.

PAGE_LOAD_STRATEGYstring

Defines the session's page loading strategy.

PLATFORM_NAMEstring

Identifies the operating system of the endpoint node. Common values recognized by the most WebDriver server implementations are predefined in the Platform enum.

PROXYstring

Describes the proxy configuration to use for a new WebDriver session.

SET_WINDOW_RECTstring

Indicates whether the remote end supports all of the window resizing and positioning commands:

  • Window.getRect()
  • Window.setRect()
  • Window.maximize()
  • Window.minimize()
  • Window.fullscreen()
TIMEOUTSstring

Describes the timeouts imposed on certain session operations.

UNHANDLED_PROMPT_BEHAVIORstring

Defines how a WebDriver session should respond to unhandled user prompts.

STRICT_FILE_INTERACTABILITYstring

Defines the current session’s strict file interactability. Used to upload a file when strict file interactability is on

ENABLE_DOWNLOADSstring

(constant) Config

(constant) ErrorCode :number

Enum of legacy error codes. TODO: remove this when all code paths have been switched to the new error types.

Type:
  • number
Properties
NameTypeDescription
SUCCESSnumber
NO_SUCH_SESSIONnumber
NO_SUCH_ELEMENTnumber
NO_SUCH_FRAMEnumber
UNKNOWN_COMMANDnumber
UNSUPPORTED_OPERATIONnumber
STALE_ELEMENT_REFERENCEnumber
ELEMENT_NOT_VISIBLEnumber
INVALID_ELEMENT_STATEnumber
UNKNOWN_ERRORnumber
ELEMENT_NOT_SELECTABLEnumber
JAVASCRIPT_ERRORnumber
XPATH_LOOKUP_ERRORnumber
TIMEOUTnumber
NO_SUCH_WINDOWnumber
INVALID_COOKIE_DOMAINnumber
UNABLE_TO_SET_COOKIEnumber
UNEXPECTED_ALERT_OPENnumber
NO_SUCH_ALERTnumber
SCRIPT_TIMEOUTnumber
INVALID_ELEMENT_COORDINATESnumber
IME_NOT_AVAILABLEnumber
IME_ENGINE_ACTIVATION_FAILEDnumber
INVALID_SELECTOR_ERRORnumber
SESSION_NOT_CREATEDnumber
MOVE_TARGET_OUT_OF_BOUNDSnumber
SQL_DATABASE_ERRORnumber
INVALID_XPATH_SELECTORnumber
INVALID_XPATH_SELECTOR_RETURN_TYPEnumber
ELEMENT_NOT_INTERACTABLEnumber
INVALID_ARGUMENTnumber
NO_SUCH_COOKIEnumber
UNABLE_TO_CAPTURE_SCREENnumber
ELEMENT_CLICK_INTERCEPTEDnumber
METHOD_NOT_ALLOWEDnumber
Deprecated
  • Yes

(constant) EvaluateResultType :string

Represents the type of script evaluation result. Described in https://w3c.github.io/webdriver-bidi/#type-script-EvaluateResult.

Type:
  • string
Properties
NameTypeDescription
SUCCESSstring
EXCEPTIONstring

(package, constant) INTERNAL_COMPUTE_OFFSET_SCRIPT

Script used to compute the offset from the center of a DOM element's first client rect from the top-left corner of the element's bounding client rect. The element's center point is computed using the algorithm defined here: https://w3c.github.io/webdriver/webdriver-spec.html#dfn-center-point.

This is only exported for use in internal unit tests. DO NOT USE.

(constant) InterceptPhase :string

Represents the different phases of intercepting network requests and responses.

Type:
  • string
Properties
NameTypeDescription
BEFORE_REQUEST_SENTstring
RESPONSE_STARTEDstring
AUTH_REQUIREDstring

(constant) Key :string

Representations of pressable keys that aren't text. These are stored in the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to http://www.google.com.au/search?&q=unicode+pua&btnK=Search

Type:
  • string
Properties
NameTypeDescription
NULLstring
CANCELstring
HELPstring
BACK_SPACEstring
TABstring
CLEARstring
RETURNstring
ENTERstring
SHIFTstring
CONTROLstring
ALTstring
PAUSEstring
ESCAPEstring
SPACEstring
PAGE_UPstring
PAGE_DOWNstring
ENDstring
HOMEstring
ARROW_LEFTstring
LEFTstring
ARROW_UPstring
UPstring
ARROW_RIGHTstring
RIGHTstring
ARROW_DOWNstring
DOWNstring
INSERTstring
DELETEstring
SEMICOLONstring
EQUALSstring
NUMPAD0string
NUMPAD1string
NUMPAD2string
NUMPAD3string
NUMPAD4string
NUMPAD5string
NUMPAD6string
NUMPAD7string
NUMPAD8string
NUMPAD9string
MULTIPLYstring
ADDstring
SEPARATORstring
SUBTRACTstring
DECIMALstring
DIVIDEstring
F1string
F2string
F3string
F4string
F5string
F6string
F7string
F8string
F9string
F10string
F11string
F12string
COMMANDstring
METAstring
ZENKAKU_HANKAKUstring

Japanese modifier key for switching between full- and half-width characters.

(constant) ManualConfig

(constant) Name :string

Enumeration of predefined names command names that all command processors will support.

Type:
  • string
Properties
NameTypeDescription
GET_SERVER_STATUSstring
NEW_SESSIONstring
GET_SESSIONSstring
CLOSEstring
QUITstring
GET_CURRENT_URLstring
GETstring
GO_BACKstring
GO_FORWARDstring
REFRESHstring
ADD_COOKIEstring
GET_COOKIEstring
GET_ALL_COOKIESstring
DELETE_COOKIEstring
DELETE_ALL_COOKIESstring
GET_ACTIVE_ELEMENTstring
FIND_ELEMENTstring
FIND_ELEMENTSstring
FIND_ELEMENTS_RELATIVEstring
FIND_CHILD_ELEMENTstring
FIND_CHILD_ELEMENTSstring
CLEAR_ELEMENTstring
CLICK_ELEMENTstring
SEND_KEYS_TO_ELEMENTstring
GET_CURRENT_WINDOW_HANDLEstring
GET_WINDOW_HANDLESstring
GET_WINDOW_RECTstring
SET_WINDOW_RECTstring
MAXIMIZE_WINDOWstring
MINIMIZE_WINDOWstring
FULLSCREEN_WINDOWstring
SWITCH_TO_WINDOWstring
SWITCH_TO_NEW_WINDOWstring
SWITCH_TO_FRAMEstring
SWITCH_TO_FRAME_PARENTstring
GET_PAGE_SOURCEstring
GET_TITLEstring
EXECUTE_SCRIPTstring
EXECUTE_ASYNC_SCRIPTstring
GET_ELEMENT_TEXTstring
GET_COMPUTED_ROLEstring
GET_COMPUTED_LABELstring
GET_ELEMENT_TAG_NAMEstring
IS_ELEMENT_SELECTEDstring
IS_ELEMENT_ENABLEDstring
IS_ELEMENT_DISPLAYEDstring
GET_ELEMENT_RECTstring
GET_ELEMENT_ATTRIBUTEstring
GET_DOM_ATTRIBUTEstring
GET_ELEMENT_VALUE_OF_CSS_PROPERTYstring
GET_ELEMENT_PROPERTYstring
SCREENSHOTstring
TAKE_ELEMENT_SCREENSHOTstring
PRINT_PAGEstring
GET_TIMEOUTstring
SET_TIMEOUTstring
ACCEPT_ALERTstring
DISMISS_ALERTstring
GET_ALERT_TEXTstring
SET_ALERT_TEXTstring
GET_SHADOW_ROOTstring
FIND_ELEMENT_FROM_SHADOWROOTstring
FIND_ELEMENTS_FROM_SHADOWROOTstring
ADD_VIRTUAL_AUTHENTICATORstring
REMOVE_VIRTUAL_AUTHENTICATORstring
ADD_CREDENTIALstring
GET_CREDENTIALSstring
REMOVE_CREDENTIALstring
REMOVE_ALL_CREDENTIALSstring
SET_USER_VERIFIEDstring
GET_AVAILABLE_LOG_TYPESstring
GET_LOGstring
UPLOAD_FILEstring
ACTIONSstring
CLEAR_ACTIONSstring
GET_DOWNLOADABLE_FILESstring
DOWNLOAD_FILEstring
DELETE_DOWNLOADABLE_FILESstring
CANCEL_DIALOGstring
SELECT_ACCOUNTstring
GET_ACCOUNTSstring
GET_FEDCM_TITLEstring
GET_FEDCM_DIALOG_TYPEstring
SET_DELAY_ENABLEDstring
RESET_COOLDOWNstring
CLICK_DIALOG_BUTTONstring

(constant) NonPrimitiveType

Represents a non-primitive type.

Properties
NameTypeDescription
ARRAY
DATE
MAP
OBJECT
REGULAR_EXPRESSION
SET
CHANNEL
findByName

(constant) Origin :string

Defines the reference point from which to compute offsets for capturing screenshot.

Type:
  • string
Properties
NameTypeDescription
VIEWPORTstring
DOCUMENTstring

(constant) Origin :string

Defines the reference point from which to compute offsets for pointer move actions.

Type:
  • string
Properties
NameTypeDescription
POINTERstring

Compute offsets relative to the pointer's current position.

VIEWPORTstring

Compute offsets relative to the viewport.

(constant) PacConfig

(constant) PageLoadStrategy :string

Strategies for waiting for document readiness after a navigation event.

Type:
  • string
Properties
NameTypeDescription
NONEstring

Indicates WebDriver should not wait on the document readiness state after a navigation event.

EAGERstring

Indicates WebDriver should wait for the document readiness state to become "interactive" after navigation.

NORMALstring

Indicates WebDriver should wait for the document readiness state to be "complete" after navigation. This is the default page loading strategy.

(constant) Platform :string

Common platform names. These platforms are not explicitly defined by the WebDriver spec, however, their use is encouraged for interoperability.

Type:
  • string
Properties
NameTypeDescription
LINUXstring
MACstring
WINDOWSstring

(constant) PrimitiveType

Represents a primitive type.

Properties
NameTypeDescription
UNDEFINED
NULL
STRING
NUMBER
SPECIAL_NUMBER
BOOLEAN
BIGINT
findByName

(constant) Protocol :string

Protocol for virtual authenticators

Type:
  • string
Properties
NameTypeDescription
CTAP2string
U2Fstring

(constant) RealmType

Represents the types of realms. Described in https://w3c.github.io/webdriver-bidi/#type-script-RealmType.

Properties
NameTypeDescription
AUDIO_WORKLET
DEDICATED_WORKER
PAINT_WORKLET
SERVICE_WORKED
SHARED_WORKED
WINDOW
WORKER
WORKLET
findByName

(constant) RemoteReferenceType :string

Represents the types of remote reference.

Type:
  • string
Properties
NameTypeDescription
HANDLEstring
SHARED_IDstring

(constant) RemoteType

Represents a remote value type.

Properties
NameTypeDescription
SYMBOL
FUNCTION
WEAK_MAP
WEAK_SET
ITERATOR
GENERATOR
ERROR
PROXY
PROMISE
TYPED_ARRAY
ARRAY_BUFFER
NODE_LIST
HTML_COLLECTION
NODE
WINDOW
findByName

(constant) ResultOwnership :string

Enum representing the ownership types.

Type:
  • string
Properties
NameTypeDescription
ROOTstring
NONEstring

(constant) SameSite :string

Represents the possible values for the SameSite attribute of a cookie.

Type:
  • string
Properties
NameTypeDescription
STRICTstring
LAXstring
NONEstring
findByNamestring

(constant) SpecialNumberType

Represents a speacial number type.

Properties
NameTypeDescription
NAN
MINUS_ZERO
INFINITY
MINUS_INFINITY

(constant, non-null) THENABLE_DRIVERS :Map.<function(new:WebDriver, !IThenable.<!Session>, ...?), function(new:ThenableWebDriver, !IThenable.<!Session>, ...?)>

Type:

(constant) Transport :string

AuthenticatorTransport values

Type:
  • string
Properties
NameTypeDescription
BLEstring
USBstring
NFCstring
INTERNALstring

(constant) Type :string

Represents the types of partition descriptors.

Type:
  • string
Properties
NameTypeDescription
CONTEXTstring
STORAGE_KEYstring

(constant) Type :string

Common log types.

Type:
  • string
Properties
NameTypeDescription
BROWSERstring

Logs originating from the browser.

CLIENTstring

Logs from a WebDriver client.

DRIVERstring

Logs from a WebDriver implementation.

PERFORMANCEstring

Logs related to performance.

SERVERstring

Logs from the remote server.

(constant) Type :string

Supported proxy configuration types.

Type:
  • string
Properties
NameTypeDescription
AUTODETECTstring
DIRECTstring
MANUALstring
PACstring
SYSTEMstring

(constant) Type

(constant) USER_AGENT :string

Type:
  • string

(constant) UserPromptHandler :string

The possible default actions a WebDriver session can take to respond to unhandled user prompts (window.alert(), window.confirm(), and window.prompt()).

Type:
  • string
Properties
NameTypeDescription
ACCEPTstring

All prompts should be silently accepted.

DISMISSstring

All prompts should be silently dismissed.

ACCEPT_AND_NOTIFYstring

All prompts should be automatically accepted, but an error should be returned to the next (or currently executing) WebDriver command.

DISMISS_AND_NOTIFYstring

All prompts should be automatically dismissed, but an error should be returned to the next (or currently executing) WebDriver command.

IGNOREstring

All prompts should be left unhandled.

(constant, non-null) W3C_COMMAND_MAP :Map.<string, (CommandSpec|CommandTransformer)>

Type:

(non-null) builtTargets :Object

Targets that have been previously built.

Type:
  • Object

(constant) path

This implementation is still in beta, and may change.

Utility to find if a given file is present and executable.

start

Starts the server on the specified port.

stop

Stops the server.

url

Formats a URL for this server.

Methods

ableToSwitchToFrame(frame) → (non-null) {Condition.<boolean>}

Creates a condition that will wait until the input driver is able to switch to the designated frame. The target frame may be specified as

  1. a numeric index into window.frames for the currently selected frame.
  2. a ./webdriver.WebElement, which must reference a FRAME or IFRAME element on the current page.
  3. a locator which may be used to first locate a FRAME or IFRAME on the current page before attempting to switch to it.

Upon successful resolution of this condition, the driver will be left focused on the new frame.

Parameters:
NameTypeDescription
frame
Returns:

A new condition.

Type: 
Condition.<boolean>

addConsoleHandler(opt_loggeropt)

Adds the console handler to the given logger. The console handler will log all messages using the JavaScript Console API.

Parameters:
NameTypeAttributesDescription
opt_loggerLogger<optional>

The logger to add the handler to; defaults to the root logger.

alertIsPresent()

Creates a condition that waits for an alert to be opened. Upon success, the returned promise will be fulfilled with the handle for the opened alert.

Returns:

arraysEqual(array1, array2)

Checks if the two arrays are equal or not. Conditions to check are:

  1. If the length of both arrays is equal
  2. If all elements of array1 are present in array2
  3. If all elements of array2 are present in array1
Parameters:
NameTypeDescription
array1

First array to be checked for equality

array2

Second array to be checked for equality

Returns:

true if equal, otherwise false.

binaryPaths(args) → {Object}

Determines the path of the correct driver

Parameters:
NameTypeDescription
argsArray.<string>

arguments to invoke Selenium Manager

Returns:

path of the driver and browser location

Type: 
Object

buildPath(path, parametersnon-null) → {string}

Builds a fully qualified path using the given set of command parameters. Each path segment prefixed with ':' will be replaced by the value of the corresponding parameter. All parameters spliced into the path will be removed from the parameter map.

Parameters:
NameTypeDescription
pathstring

The original resource path.

parametersObject.<*>

The parameters object to splice into the path.

Returns:

The modified path.

Type: 
string

buildRequest(customCommands, commandnon-null) → (non-null) {Request}

Parameters:
NameTypeDescription
customCommandsMap.<string, CommandSpec>

A map of custom command definitions.

commandcmd.Command

The command to resolve.

Returns:

A promise that will resolve with the command to execute.

Type: 
Request

check(locatornon-null) → (non-null) {By|function}

Checks if a value is a valid locator.

Parameters:
NameTypeDescription
locatorBy | function | ByHash

The value to check.

Throws:

If the given value does not define a valid locator strategy.

Type
TypeError
Returns:

The valid locator.

Type: 
By | function

checkCodePoint(key) → {string}

Parameters:
NameTypeDescription
keystring | Key | number
Throws:
Returns:
Type: 
string

checkLegacyResponse(responseObj) → {*}

Checks a legacy response from the Selenium 2.0 wire protocol for an error.

Parameters:
NameTypeDescription
responseObj*

the response object to check.

Throws:

if the response object defines an error.

Type
WebDriverError
Returns:

responseObj the original response if it does not define an error.

Type: 
*

checkOptions(capsnon-null, key, optionType, setMethod)

In the 3.x releases, the various browser option classes (e.g. firefox.Options) had to be manually set as an option using the Capabilities class:

let ffo = new firefox.Options();
 // Configure firefox options...
 
 let caps = new Capabilities();
@@ -41,7 +41,7 @@
     });
 });
 
Parameters:
NameTypeDescription
predicateFnfunction

A predicate to call to determine if the test should be suppressed. This function MUST be synchronous.

Returns:

an object with wrapped versions of the describe and it test functions.

Type: 
Object

init(forceopt)

Initializes this module by determining which browsers a test suite should run against. The default behavior is to run tests against every browser with a WebDriver executables (chromedriver, firefoxdriver, etc.) are installed on the system by PATH.

Specific browsers can be selected at runtime by setting the SELENIUM_BROWSER environment variable. This environment variable has the same semantics as with the WebDriver Builder, except you may use a comma-delimited list to run against multiple browsers:

SELENIUM_BROWSER=chrome,firefox mocha --recursive tests/
-

The SELENIUM_REMOTE_URL environment variable may be set to configure tests to run against an externally managed (usually remote) Selenium server. When set, the WebDriver builder provided by each TestEnvironment will automatically be configured to use this server instead of starting a browser driver locally.

The SELENIUM_SERVER_JAR environment variable may be set to the path of a standalone Selenium server on the local machine that should be used for WebDriver sessions. When set, the WebDriver builder provided by each TestEnvironment will automatically be configured to use the started server instead of using a browser driver directly. It should only be necessary to set the SELENIUM_SERVER_JAR when testing locally against browsers not natively supported by the WebDriver Builder.

When either of the SELENIUM_REMOTE_URL or SELENIUM_SERVER_JAR environment variables are set, the SELENIUM_BROWSER variable must also be set.

Parameters:
NameTypeAttributesDefaultDescription
forceboolean<optional>
false

whether to force this module to re-initialize and scan process.env again to determine which browsers to run tests against.

installConsoleHandler()

Installs the console log handler on the root logger.

isErrorResponse(data) → {boolean}

Tests if the given value is a valid error response object according to the W3C WebDriver spec.

Parameters:
NameTypeDescription
data?

The value to test.

Returns:

Whether the given value data object is a valid error response.

Type: 
boolean

isFree(port, opt_hostopt) → (non-null) {Promise.<boolean>}

Tests if a port is free.

Parameters:
NameTypeAttributesDescription
portnumber

The port to test.

opt_hoststring<optional>

The bound host to test the {@code port} against. Defaults to {@code INADDR_ANY}.

Returns:

A promise that will resolve with whether the port is free.

Type: 
Promise.<boolean>

isId(obj) → {boolean}

Parameters:
NameTypeDescription
obj?

the object to test.

Returns:

whether the object is a valid encoded WebElement ID.

Type: 
boolean

isIdle(actionsnon-null) → {boolean}

Parameters:
NameTypeDescription
actionsArray.<!Action>
Returns:
Type: 
boolean

isObject(value) → {boolean}

Determines whether a {@code value} should be treated as an object.

Parameters:
NameTypeDescription
value?

The value to test.

Returns:

Whether the value is an object.

Type: 
boolean

isPromise(value) → {boolean}

Determines whether a {@code value} should be treated as a promise. Any object whose "then" property is a function will be considered a promise.

Parameters:
NameTypeDescription
value?

The value to test.

Returns:

Whether the value is a promise.

Type: 
boolean

isRetryableNetworkError(errnon-null) → {boolean}

Parameters:
NameTypeDescription
errError
Returns:
Type: 
boolean

isSelenium3x(seleniumStandalonePath) → {boolean}

Parameters:
NameTypeDescription
seleniumStandalonePathstring

path to standalone server

Returns:
Type: 
boolean

legacyTimeout(drivernon-null, type, ms) → (non-null) {Promise.<void>}

Parameters:
NameTypeDescription
driverWebDriver
typestring
msnumber
Returns:
Type: 
Promise.<void>

load(path) → (non-null) {Promise.<!Zip>}

Asynchronously opens a zip archive.

Parameters:
NameTypeDescription
pathstring

to the zip archive to load.

Returns:

a promise that will resolve with the opened archive.

Type: 
Promise.<!Zip>

locate(filePath) → {string}

Locates a test resource.

Parameters:
NameTypeDescription
filePathstring

The file to locate from the root of the project.

Throws:

If the file does not exist.

Type
Error
Returns:

The full path for the file, if it exists.

Type: 
string

locateWith(by) → {RelativeBy}

Start searching for relative objects using search criteria with By.

Parameters:
NameTypeDescription
bystring

A By map that shows how to find the initial element

Returns:
Type: 
RelativeBy

manual(options) → (non-null) {ManualConfig}

Manually configures the browser proxy. The following options are supported:

  • ftp: Proxy host to use for FTP requests
  • http: Proxy host to use for HTTP requests
  • https: Proxy host to use for HTTPS requests
  • bypass: A list of hosts requests should directly connect to, bypassing any other proxies for that request. May be specified as a comma separated string, or a list of strings.

Behavior is undefined for FTP, HTTP, and HTTPS requests if the corresponding key is omitted from the configuration options.

Parameters:
NameTypeDescription
optionsObject

Proxy configuration options.

Returns:

A new proxy configuration object.

Type: 
ManualConfig

(async) map(arraynon-null, fn, selfopt)

Calls a function for each element in an array and inserts the result into a new array, which is used as the fulfillment value of the promise returned by this function.

If the return value of the mapping function is a promise, this function will wait for it to be fulfilled before inserting it into the new array.

If the mapping function throws or returns a rejected promise, the promise returned by this function will be rejected with the same reason. Only the first failure will be reported; all subsequent errors will be silently ignored.

Parameters:
NameTypeAttributesDescription
arrayArray.<TYPE> | IThenable.<!Array.<TYPE>>

The array to iterate over, or a promise that will resolve to said array.

fnfunction

The function to call for each element in the array. This function should expect three arguments (the element, the index, and the array itself.

selfSELF<optional>

The object to be used as the value of 'this' within fn.

mkdir(aPath) → (non-null) {Promise.<string>}

Creates a directory.

Parameters:
NameTypeDescription
aPathstring

The directory path.

Returns:

A promise that will resolve with the path of the created directory.

Type: 
Promise.<string>

mkdirp(dir) → (non-null) {Promise.<string>}

Recursively creates a directory and any ancestors that do not yet exist.

Parameters:
NameTypeDescription
dirstring

The directory path to create.

Returns:

A promise that will resolve with the path of the created directory.

Type: 
Promise.<string>

of(…var_args) → (non-null) {Build}

Creates a build of the listed targets.

Parameters:
NameTypeAttributesDescription
var_argsstring<repeatable>

The targets to build.

Throws:

If not running in dev mode.

Type
Error
Returns:

The new build.

Type: 
Build

pac(proxyAutoconfigUrl) → (non-null) {PacConfig}

Configures WebDriver to configure the browser proxy using the PAC file at the given URL.

Parameters:
NameTypeDescription
proxyAutoconfigUrlstring

URL for the PAC proxy to use.

Returns:

A new proxy configuration object.

Type: 
PacConfig

pad(n) → {string}

Pads a number to ensure it has a minimum of two digits.

Parameters:
NameTypeDescription
nnumber

the number to be padded.

Returns:

the padded number.

Type: 
string

parseHttpResponse(commandnon-null, httpResponsenon-null) → {Object}

Callback used to parse Response objects from a HttpClient.

Parameters:
NameTypeDescription
commandcmd.Command

The command the response is for.

httpResponseResponse

The HTTP response to parse.

Throws:

If the HTTP response is an error.

Type
WebDriverError
Returns:

An object describing the parsed response. This object will have two fields: isW3C indicates whether the response looks like it came from a remote end that conforms with the W3C WebDriver spec, and value, the actual response value.

Type: 
Object

projectRoot() → {string}

Throws:

If not running in dev mode.

Type
Error
Returns:

Absolute path of the project's root directory.

Type: 
string

read(aPath) → (non-null) {Promise.<!Buffer>}

Reads the contents of the given file.

Parameters:
NameTypeDescription
aPathstring

Path to the file to read.

Returns:

A promise that will resolve with a buffer of the file contents.

Type: 
Promise.<!Buffer>

removeConsoleHandler(opt_loggeropt)

Removes the console log handler from the given logger.

Parameters:
NameTypeAttributesDescription
opt_loggerLogger<optional>

The logger to remove the handler from; defaults to the root logger.

See
  • exports.addConsoleHandler

requireAtom(module, bazelTarget) → (non-null) {function}

Parameters:
NameTypeDescription
modulestring
bazelTargetstring
Returns:
Type: 
function

resolveCommandLineFlags(argsnon-null) → (non-null) {Promise.<!Array.<string>>}

Parameters:
NameTypeDescription
argsArray.<CommandLineFlag> | IThenable.<!Array.<CommandLineFlag>>
Returns:
Type: 
Promise.<!Array.<string>>

resolveWaitMessage(messageopt) → {string}

Resolves a wait message from either a function or a string.

Parameters:
NameTypeAttributesDescription
messagestring | function<optional>

An optional message to use if the wait times out.

Returns:

The resolved message

Type: 
string

rmDir(dirPath) → (non-null) {Promise}

Recursively removes a directory and all of its contents. This is equivalent to {@code rm -rf} on a POSIX system.

Parameters:
NameTypeDescription
dirPathstring

Path to the directory to remove.

Returns:

A promise to be resolved when the operation has completed.

Type: 
Promise

sendIndex(requestnon-null, responsenon-null)

Responds to a request for the file server's main index.

Parameters:
NameTypeDescription
requesthttp.ServerRequest

The request object.

responsehttp.ServerResponse

The response object.

sendRequest(optionsnon-null, onOk, onError, opt_dataopt, nullable, opt_proxyopt, nullable, opt_retriesopt)

Sends a single HTTP request.

Parameters:
NameTypeAttributesDescription
optionsObject

The request options.

onOkfunction

The function to call if the request succeeds.

onErrorfunction

The function to call if the request fails.

opt_datastring<optional>
<nullable>

The data to send with the request.

opt_proxyRequestOptions<optional>
<nullable>

The proxy server to use for the request.

opt_retriesnumber<optional>

The current number of retries.

serialize(capsnon-null) → (non-null) {Object.<string, ?>}

Serializes a capabilities object. This is defined as a standalone function so it may be type checked (where Capabilities[Symbols.serialize] has type checking disabled since it is defined with [] access on a struct).

Parameters:
NameTypeDescription
capsCapabilities

The capabilities to serialize.

Returns:

The JSON representation of this instance. Note, the returned object may contain nested promised values.

Type: 
Object.<string, ?>

setFileDetector(detector)

Parameters:
NameTypeDescription
detectorinput.FileDetector

shouldRetryRequest(retriesnon-null, errnon-null) → {boolean}

A retry is sometimes needed on Windows where we may quickly run out of ephemeral ports. A more robust solution is bumping the MaxUserPort setting as described here: http://msdn.microsoft.com/en-us/library/aa560610%28v=bts.20%29.aspx

Parameters:
NameTypeDescription
retriesnumber
errError
Returns:
Type: 
boolean

socks(socksProxy, socksVersionopt) → (non-null) {ManualConfig}

Creates a proxy configuration for a socks proxy.

Example:

const {Capabilities} = require('selenium-webdriver');
+

The SELENIUM_REMOTE_URL environment variable may be set to configure tests to run against an externally managed (usually remote) Selenium server. When set, the WebDriver builder provided by each TestEnvironment will automatically be configured to use this server instead of starting a browser driver locally.

The SELENIUM_SERVER_JAR environment variable may be set to the path of a standalone Selenium server on the local machine that should be used for WebDriver sessions. When set, the WebDriver builder provided by each TestEnvironment will automatically be configured to use the started server instead of using a browser driver directly. It should only be necessary to set the SELENIUM_SERVER_JAR when testing locally against browsers not natively supported by the WebDriver Builder.

When either of the SELENIUM_REMOTE_URL or SELENIUM_SERVER_JAR environment variables are set, the SELENIUM_BROWSER variable must also be set.

Parameters:
NameTypeAttributesDefaultDescription
forceboolean<optional>
false

whether to force this module to re-initialize and scan process.env again to determine which browsers to run tests against.

installConsoleHandler()

Installs the console log handler on the root logger.

isErrorResponse(data) → {boolean}

Tests if the given value is a valid error response object according to the W3C WebDriver spec.

Parameters:
NameTypeDescription
data?

The value to test.

Returns:

Whether the given value data object is a valid error response.

Type: 
boolean

isFree(port, opt_hostopt) → (non-null) {Promise.<boolean>}

Tests if a port is free.

Parameters:
NameTypeAttributesDescription
portnumber

The port to test.

opt_hoststring<optional>

The bound host to test the {@code port} against. Defaults to {@code INADDR_ANY}.

Returns:

A promise that will resolve with whether the port is free.

Type: 
Promise.<boolean>

isId(obj) → {boolean}

Parameters:
NameTypeDescription
obj?

the object to test.

Returns:

whether the object is a valid encoded WebElement ID.

Type: 
boolean

isIdle(actionsnon-null) → {boolean}

Parameters:
NameTypeDescription
actionsArray.<!Action>
Returns:
Type: 
boolean

isObject(value) → {boolean}

Determines whether a {@code value} should be treated as an object.

Parameters:
NameTypeDescription
value?

The value to test.

Returns:

Whether the value is an object.

Type: 
boolean

isPromise(value) → {boolean}

Determines whether a {@code value} should be treated as a promise. Any object whose "then" property is a function will be considered a promise.

Parameters:
NameTypeDescription
value?

The value to test.

Returns:

Whether the value is a promise.

Type: 
boolean

isRetryableNetworkError(errnon-null) → {boolean}

Parameters:
NameTypeDescription
errError
Returns:
Type: 
boolean

isSelenium3x(seleniumStandalonePath) → {boolean}

Parameters:
NameTypeDescription
seleniumStandalonePathstring

path to standalone server

Returns:
Type: 
boolean

legacyTimeout(drivernon-null, type, ms) → (non-null) {Promise.<void>}

Parameters:
NameTypeDescription
driverWebDriver
typestring
msnumber
Returns:
Type: 
Promise.<void>

load(path) → (non-null) {Promise.<!Zip>}

Asynchronously opens a zip archive.

Parameters:
NameTypeDescription
pathstring

to the zip archive to load.

Returns:

a promise that will resolve with the opened archive.

Type: 
Promise.<!Zip>

locate(filePath) → {string}

Locates a test resource.

Parameters:
NameTypeDescription
filePathstring

The file to locate from the root of the project.

Throws:

If the file does not exist.

Type
Error
Returns:

The full path for the file, if it exists.

Type: 
string

locateWith(by) → {RelativeBy}

Start searching for relative objects using search criteria with By.

Parameters:
NameTypeDescription
bystring

A By map that shows how to find the initial element

Returns:
Type: 
RelativeBy

manual(options) → (non-null) {ManualConfig}

Manually configures the browser proxy. The following options are supported:

  • ftp: Proxy host to use for FTP requests
  • http: Proxy host to use for HTTP requests
  • https: Proxy host to use for HTTPS requests
  • bypass: A list of hosts requests should directly connect to, bypassing any other proxies for that request. May be specified as a comma separated string, or a list of strings.

Behavior is undefined for FTP, HTTP, and HTTPS requests if the corresponding key is omitted from the configuration options.

Parameters:
NameTypeDescription
optionsObject

Proxy configuration options.

Returns:

A new proxy configuration object.

Type: 
ManualConfig

(async) map(arraynon-null, fn, selfopt)

Calls a function for each element in an array and inserts the result into a new array, which is used as the fulfillment value of the promise returned by this function.

If the return value of the mapping function is a promise, this function will wait for it to be fulfilled before inserting it into the new array.

If the mapping function throws or returns a rejected promise, the promise returned by this function will be rejected with the same reason. Only the first failure will be reported; all subsequent errors will be silently ignored.

Parameters:
NameTypeAttributesDescription
arrayArray.<TYPE> | IThenable.<!Array.<TYPE>>

The array to iterate over, or a promise that will resolve to said array.

fnfunction

The function to call for each element in the array. This function should expect three arguments (the element, the index, and the array itself.

selfSELF<optional>

The object to be used as the value of 'this' within fn.

mkdir(aPath) → (non-null) {Promise.<string>}

Creates a directory.

Parameters:
NameTypeDescription
aPathstring

The directory path.

Returns:

A promise that will resolve with the path of the created directory.

Type: 
Promise.<string>

mkdirp(dir) → (non-null) {Promise.<string>}

Recursively creates a directory and any ancestors that do not yet exist.

Parameters:
NameTypeDescription
dirstring

The directory path to create.

Returns:

A promise that will resolve with the path of the created directory.

Type: 
Promise.<string>

of(…var_args) → (non-null) {Build}

Creates a build of the listed targets.

Parameters:
NameTypeAttributesDescription
var_argsstring<repeatable>

The targets to build.

Throws:

If not running in dev mode.

Type
Error
Returns:

The new build.

Type: 
Build

pac(proxyAutoconfigUrl) → (non-null) {PacConfig}

Configures WebDriver to configure the browser proxy using the PAC file at the given URL.

Parameters:
NameTypeDescription
proxyAutoconfigUrlstring

URL for the PAC proxy to use.

Returns:

A new proxy configuration object.

Type: 
PacConfig

pad(n) → {string}

Pads a number to ensure it has a minimum of two digits.

Parameters:
NameTypeDescription
nnumber

the number to be padded.

Returns:

the padded number.

Type: 
string

parseHttpResponse(commandnon-null, httpResponsenon-null) → {Object}

Callback used to parse Response objects from a HttpClient.

Parameters:
NameTypeDescription
commandcmd.Command

The command the response is for.

httpResponseResponse

The HTTP response to parse.

Throws:

If the HTTP response is an error.

Type
WebDriverError
Returns:

An object describing the parsed response. This object will have two fields: isW3C indicates whether the response looks like it came from a remote end that conforms with the W3C WebDriver spec, and value, the actual response value.

Type: 
Object

projectRoot() → {string}

Throws:

If not running in dev mode.

Type
Error
Returns:

Absolute path of the project's root directory.

Type: 
string

read(aPath) → (non-null) {Promise.<!Buffer>}

Reads the contents of the given file.

Parameters:
NameTypeDescription
aPathstring

Path to the file to read.

Returns:

A promise that will resolve with a buffer of the file contents.

Type: 
Promise.<!Buffer>

removeConsoleHandler(opt_loggeropt)

Removes the console log handler from the given logger.

Parameters:
NameTypeAttributesDescription
opt_loggerLogger<optional>

The logger to remove the handler from; defaults to the root logger.

See
  • exports.addConsoleHandler

requireAtom(module, bazelTarget) → (non-null) {function}

Parameters:
NameTypeDescription
modulestring
bazelTargetstring
Returns:
Type: 
function

resolveCommandLineFlags(argsnon-null) → (non-null) {Promise.<!Array.<string>>}

Parameters:
NameTypeDescription
argsArray.<CommandLineFlag> | IThenable.<!Array.<CommandLineFlag>>
Returns:
Type: 
Promise.<!Array.<string>>

resolveWaitMessage(messageopt) → {string}

Resolves a wait message from either a function or a string.

Parameters:
NameTypeAttributesDescription
messagestring | function<optional>

An optional message to use if the wait times out.

Returns:

The resolved message

Type: 
string

rmDir(dirPath) → (non-null) {Promise}

Recursively removes a directory and all of its contents. This is equivalent to {@code rm -rf} on a POSIX system.

Parameters:
NameTypeDescription
dirPathstring

Path to the directory to remove.

Returns:

A promise to be resolved when the operation has completed.

Type: 
Promise

sendIndex(requestnon-null, responsenon-null)

Responds to a request for the file server's main index.

Parameters:
NameTypeDescription
requesthttp.ServerRequest

The request object.

responsehttp.ServerResponse

The response object.

sendRequest(optionsnon-null, onOk, onError, opt_dataopt, nullable, opt_proxyopt, nullable, opt_retriesopt)

Sends a single HTTP request.

Parameters:
NameTypeAttributesDescription
optionsObject

The request options.

onOkfunction

The function to call if the request succeeds.

onErrorfunction

The function to call if the request fails.

opt_datastring<optional>
<nullable>

The data to send with the request.

opt_proxyRequestOptions<optional>
<nullable>

The proxy server to use for the request.

opt_retriesnumber<optional>

The current number of retries.

serialize(capsnon-null) → (non-null) {Object.<string, ?>}

Serializes a capabilities object. This is defined as a standalone function so it may be type checked (where Capabilities[Symbols.serialize] has type checking disabled since it is defined with [] access on a struct).

Parameters:
NameTypeDescription
capsCapabilities

The capabilities to serialize.

Returns:

The JSON representation of this instance. Note, the returned object may contain nested promised values.

Type: 
Object.<string, ?>

setFileDetector(detector)

Parameters:
NameTypeDescription
detectorinput.FileDetector

shouldRetryRequest(retriesnon-null, errnon-null) → {boolean}

A retry is sometimes needed on Windows where we may quickly run out of ephemeral ports. A more robust solution is bumping the MaxUserPort setting as described here: http://msdn.microsoft.com/en-us/library/aa560610%28v=bts.20%29.aspx

Parameters:
NameTypeDescription
retriesnumber
errError
Returns:
Type: 
boolean

socks(socksProxy, socksVersionopt) → (non-null) {ManualConfig}

Creates a proxy configuration for a socks proxy.

Example:

const {Capabilities} = require('selenium-webdriver');
 const proxy = require('selenium-webdriver/lib/proxy');
 
 let capabilities = new Capabilities();
@@ -94,4 +94,4 @@
 });
 
Parameters:
NameTypeDescription
promiseIThenable.<?>

The promise to add the listener to.

callbackfunction

The function to call when the promise is resolved.

Returns:

A promise that will be resolved with the callback result.

Type: 
Promise.<R>

throwDecodedError(data)

Throws an error coded from the W3C protocol. A generic error will be thrown if the provided data is not a valid encoded error.

Parameters:
NameTypeDescription
dataObject

The error data to decode.

Throws:

the decoded error.

Type
WebDriverError

titleContains(substr) → (non-null) {Condition.<boolean>}

Creates a condition that will wait for the current page's title to contain the given substring.

Parameters:
NameTypeDescription
substrstring

The substring that should be present in the page title.

Returns:

The new condition.

Type: 
Condition.<boolean>

titleIs(title) → (non-null) {Condition.<boolean>}

Creates a condition that will wait for the current page's title to match the given value.

Parameters:
NameTypeDescription
titlestring

The expected page title.

Returns:

The new condition.

Type: 
Condition.<boolean>

titleMatches(regexnon-null) → (non-null) {Condition.<boolean>}

Creates a condition that will wait for the current page's title to match the given regular expression.

Parameters:
NameTypeDescription
regexRegExp

The regular expression to test against.

Returns:

The new condition.

Type: 
Condition.<boolean>

tmpDir() → (non-null) {Promise.<string>}

Returns:

A promise for the path to a temporary directory.

Type: 
Promise.<string>

tmpFile(opt_optionsopt) → (non-null) {Promise.<string>}

Parameters:
NameTypeAttributesDescription
opt_optionsObject<optional>

Temporary file options.

Returns:

A promise for the path to a temporary file.

Type: 
Promise.<string>

toExecuteAtomCommand(commandnon-null, atom, …params) → (non-null) {Command}

Parameters:
NameTypeAttributesDescription
commandcmd.Command

The initial command.

atomAtom

The name of the atom to execute.

params<repeatable>
Returns:

The transformed command to execute.

Type: 
Command

toMap(hashnon-null) → (non-null) {Map.<string, ?>}

Converts a generic hash object to a map.

Parameters:
NameTypeDescription
hashObject.<string, ?>

The hash object.

Returns:

The converted map.

Type: 
Map.<string, ?>

(async) toWireValue(obj) → (non-null) {Promise.<?>}

Converts an object to its JSON representation in the WebDriver wire protocol. When converting values of type object, the following steps will be taken:

  1. if the object is a WebElement, the return value will be the element's server ID
  2. if the object defines a Symbols.serialize method, this algorithm will be recursively applied to the object's serialized representation
  3. if the object provides a "toJSON" function, this algorithm will recursively be applied to the result of that function
  4. otherwise, the value of each key will be recursively converted according to the rules above.
Parameters:
NameTypeDescription
obj*

The object to convert.

Returns:

A promise that will resolve to the input value's JSON representation.

Type: 
Promise.<?>

tryParse(str) → {?}

Parameters:
NameTypeDescription
strstring

.

Returns:

.

Type: 
?

Deletes a name from the filesystem and possibly the file it refers to. Has no effect if the file does not exist.

Parameters:
NameTypeDescription
aPathstring

The path to remove.

Returns:

A promise for when the file has been removed.

Type: 
Promise

unzip(src, dst) → (non-null) {Promise.<string>}

Asynchronously unzips an archive file.

Parameters:
NameTypeDescription
srcstring

path to the source file to unzip.

dststring

path to the destination directory.

Returns:

a promise that will resolve with dst once the archive has been unzipped.

Type: 
Promise.<string>

urlContains(substrUrl) → (non-null) {Condition.<boolean>}

Creates a condition that will wait for the current page's url to contain the given substring.

Parameters:
NameTypeDescription
substrUrlstring

The substring that should be present in the current URL.

Returns:

The new condition.

Type: 
Condition.<boolean>

urlIs(url) → (non-null) {Condition.<boolean>}

Creates a condition that will wait for the current page's url to match the given value.

Parameters:
NameTypeDescription
urlstring

The expected page url.

Returns:

The new condition.

Type: 
Condition.<boolean>

urlMatches(regexnon-null) → (non-null) {Condition.<boolean>}

Creates a condition that will wait for the current page's url to match the given regular expression.

Parameters:
NameTypeDescription
regexRegExp

The regular expression to test against.

Returns:

The new condition.

Type: 
Condition.<boolean>

waitForServer(url, timeout, opt_cancelTokenopt) → (non-null) {Promise}

Waits for a WebDriver server to be healthy and accepting requests.

Parameters:
NameTypeAttributesDescription
urlstring

Base URL of the server to query.

timeoutnumber

How long to wait for the server.

opt_cancelTokenPromise<optional>

A promise used as a cancellation signal: if resolved before the server is ready, the wait will be terminated early with a CancellationError.

Returns:

A promise that will resolve when the server is ready, or if the wait is cancelled.

Type: 
Promise

waitForUrl(url, timeout, opt_cancelTokenopt) → (non-null) {Promise}

Polls a URL with GET requests until it returns a 2xx response or the timeout expires.

Parameters:
NameTypeAttributesDescription
urlstring

The URL to poll.

timeoutnumber

How long to wait, in milliseconds.

opt_cancelTokenPromise<optional>

A promise used as a cancellation signal: if resolved before the a 2xx response is received, the wait will be terminated early with a CancellationError.

Returns:

A promise that will resolve when a 2xx is received from the given URL, or if the wait is cancelled.

Type: 
Promise

walkDir(rootPath) → (non-null) {Promise.<!Array.<{path: string, dir: boolean}>>}

Recursively walks a directory, returning a promise that will resolve with a list of all files/directories seen.

Parameters:
NameTypeDescription
rootPathstring

the directory to walk.

Returns:

a promise that will resolve with a list of entries seen. For each entry, the recorded path will be relative to rootPath.

Type: 
Promise.<!Array.<{path: string, dir: boolean}>>

whereIs(filePath) → {string}

Builds the URL for a file in the //common/src/web directory of the Selenium client.

Parameters:
NameTypeDescription
filePathstring

A path relative to //common/src/web to compute a URL for.

Throws:

If the server is not running.

Type
Error
Returns:

The formatted URL.

Type: 
string

withTagName(tagName)

Start Searching for relative objects using the value returned from By.tagName().

Note: this method will likely be removed in the future please use locateWith.

Parameters:
NameTypeDescription
tagNameBy

The value returned from calling By.tagName()

Returns:

write(aPath, data) → (non-null) {Promise}

Writes to a file.

Parameters:
NameTypeDescription
aPathstring

Path to the file to write to.

datastring | Buffer

The data to write.

Returns:

A promise that will resolve when the operation has completed.

Type: 
Promise

Type Definitions

ByHash

Short-hand expressions for the primary element locator strategies. For example the following two statements are equivalent:

var e1 = driver.findElement(By.id('foo'));
 var e2 = driver.findElement({id: 'foo'});
-

Care should be taken when using JavaScript minifiers (such as the Closure compiler), as locator hashes will always be parsed using the un-obfuscated properties listed.

Type:
  • Object | Object | Object | Object | Object | Object | Object | Object | Object

CommandLineFlag

Type:
  • string | !IThenable.<string>

CommandSpec

Type:
  • Object

CommandTransformer()

RequestOptions

Type:
  • Object

StdIoOptions

Type:
  • string | !Array.<(string|number|!stream.Stream|null|undefined)>
Selenium WebDriver JavaScript API
\ No newline at end of file +

Care should be taken when using JavaScript minifiers (such as the Closure compiler), as locator hashes will always be parsed using the un-obfuscated properties listed.

Type:
  • Object | Object | Object | Object | Object | Object | Object | Object | Object

CommandLineFlag

Type:
  • string | !IThenable.<string>

CommandSpec

Type:
  • Object

CommandTransformer()

RequestOptions

Type:
  • Object

StdIoOptions

Type:
  • string | !Array.<(string|number|!stream.Stream|null|undefined)>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/global.html#Browser b/docs/api/javascript/global.html#Browser index fe37ad8cd682c..fd4a8196aac6b 100644 --- a/docs/api/javascript/global.html#Browser +++ b/docs/api/javascript/global.html#Browser @@ -1,3 +1,3 @@ Class: Browser
On this page

Browser

Represents the commands and events under Browser Module. Described in https://w3c.github.io/webdriver-bidi/#module-browser

Constructor

new Browser()

Members

(static) CHROME :string

Type:
  • string
Default Value
  • chrome

(static) EDGE :string

Type:
  • string
Default Value
  • MicrosoftEdge

(static) FIREFOX :string

Type:
  • string
Default Value
  • firefox

(static) INTERNET_EXPLORER :string

Type:
  • string
Default Value
  • internet explorer

(static) SAFARI :string

Type:
  • string
Default Value
  • safari

Methods

(async) createUserContext() → {Promise.<string>}

Creates a new user context.

Returns:

A promise that resolves to the user context id.

Type: 
Promise.<string>

(async) getUserContexts() → {Promise.<Array.<string>>}

Gets the list of all user contexts.

Returns:

A promise that resolves to an array of user context ids.

Type: 
Promise.<Array.<string>>

(async) removeUserContext(userContext) → {Promise.<void>}

Removes a user context.

Parameters:
NameTypeDescription
userContextstring

The user context id to be removed.

Returns:
Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Browser

Represents the commands and events under Browser Module. Described in https://w3c.github.io/webdriver-bidi/#module-browser

Constructor

new Browser()

Members

(static) CHROME :string

Type:
  • string
Default Value
  • chrome

(static) EDGE :string

Type:
  • string
Default Value
  • MicrosoftEdge

(static) FIREFOX :string

Type:
  • string
Default Value
  • firefox

(static) INTERNET_EXPLORER :string

Type:
  • string
Default Value
  • internet explorer

(static) SAFARI :string

Type:
  • string
Default Value
  • safari

Methods

(async) createUserContext() → {Promise.<string>}

Creates a new user context.

Returns:

A promise that resolves to the user context id.

Type: 
Promise.<string>

(async) getClientWindows() → {Promise.<Array.<ClientWindowInfo>>}

Gets information about all client windows.

Returns:

Array of client window information

Type: 
Promise.<Array.<ClientWindowInfo>>

(async) getUserContexts() → {Promise.<Array.<string>>}

Gets the list of all user contexts.

Returns:

A promise that resolves to an array of user context ids.

Type: 
Promise.<Array.<string>>

(async) removeUserContext(userContext) → {Promise.<void>}

Removes a user context.

Parameters:
NameTypeDescription
userContextstring

The user context id to be removed.

Returns:
Type: 
Promise.<void>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/global.html#Config b/docs/api/javascript/global.html#Config index b996dff39f781..faeb8e4dc286f 100644 --- a/docs/api/javascript/global.html#Config +++ b/docs/api/javascript/global.html#Config @@ -1,3 +1,3 @@ Interface: Config
On this page

Config

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

Config

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/global.html#ManualConfig b/docs/api/javascript/global.html#ManualConfig index 1a4fa2b367c38..faad5d598e4bf 100644 --- a/docs/api/javascript/global.html#ManualConfig +++ b/docs/api/javascript/global.html#ManualConfig @@ -1,3 +1,3 @@ Interface: ManualConfig
On this page

ManualConfig

Record object that defines a manual proxy configuration. Manual configurations can be easily created using either the proxy.manual() or proxy.socks() factory method.

Extends

Members

ftpProxy :string|undefined

The proxy host for FTP requests.

Type:
  • string | undefined

httpProxy :string|undefined

The proxy host for HTTP requests.

Type:
  • string | undefined

noProxy :Array.<string>|undefined

An array of hosts which should bypass all proxies.

Type:
  • Array.<string> | undefined

proxyType :Type

The proxy type.

Type:
Inherited From

socksProxy :number|undefined

Defines the host and port for the SOCKS proxy to use.

Type:
  • number | undefined

socksVersion :number|undefined

Defines the SOCKS proxy version. Must be a number in the range [0, 255].

Type:
  • number | undefined

sslProxy :string|undefined

The proxy host for HTTPS requests.

Type:
  • string | undefined
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

ManualConfig

Record object that defines a manual proxy configuration. Manual configurations can be easily created using either the proxy.manual() or proxy.socks() factory method.

Extends

Members

ftpProxy :string|undefined

The proxy host for FTP requests.

Type:
  • string | undefined

httpProxy :string|undefined

The proxy host for HTTP requests.

Type:
  • string | undefined

noProxy :Array.<string>|undefined

An array of hosts which should bypass all proxies.

Type:
  • Array.<string> | undefined

proxyType :Type

The proxy type.

Type:
Inherited From

socksProxy :number|undefined

Defines the host and port for the SOCKS proxy to use.

Type:
  • number | undefined

socksVersion :number|undefined

Defines the SOCKS proxy version. Must be a number in the range [0, 255].

Type:
  • number | undefined

sslProxy :string|undefined

The proxy host for HTTPS requests.

Type:
  • string | undefined
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/global.html#PacConfig b/docs/api/javascript/global.html#PacConfig index 51cba32ea072a..51f43258b1c6e 100644 --- a/docs/api/javascript/global.html#PacConfig +++ b/docs/api/javascript/global.html#PacConfig @@ -1,3 +1,3 @@ Interface: PacConfig
On this page

PacConfig

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

PacConfig

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/http_index.js.html b/docs/api/javascript/http_index.js.html index bad4c10d42e77..463ac6b19ef76 100644 --- a/docs/api/javascript/http_index.js.html +++ b/docs/api/javascript/http_index.js.html @@ -1,6 +1,6 @@ Source: http/index.js
On this page

http_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

http_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -344,4 +344,4 @@
 module.exports.HttpClient = HttpClient
 module.exports.Request = httpLib.Request
 module.exports.Response = httpLib.Response
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/http_util.js.html b/docs/api/javascript/http_util.js.html index 9a6bc1414261e..59b88916a0bbf 100644 --- a/docs/api/javascript/http_util.js.html +++ b/docs/api/javascript/http_util.js.html @@ -1,6 +1,6 @@ Source: http/util.js
On this page

http_util.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

http_util.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -167,4 +167,4 @@
 module.exports.CancellationError = CancellationError
 module.exports.waitForServer = waitForServer
 module.exports.waitForUrl = waitForUrl
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/ie.js.html b/docs/api/javascript/ie.js.html index be5ba247edc24..cb42ae1448c7d 100644 --- a/docs/api/javascript/ie.js.html +++ b/docs/api/javascript/ie.js.html @@ -1,6 +1,6 @@ Source: ie.js
On this page

ie.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

ie.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -481,4 +481,4 @@
 exports.Key = Key
 exports.VENDOR_COMMAND_PREFIX = OPTIONS_CAPABILITY_KEY
 exports.Behavior = SCROLL_BEHAVIOUR
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/index.html b/docs/api/javascript/index.html index 440cfc628c6ac..b32237997cdc3 100644 --- a/docs/api/javascript/index.html +++ b/docs/api/javascript/index.html @@ -1,6 +1,6 @@ Selenium WebDriver JavaScript API
On this page

selenium-webdriver

Selenium is a browser automation library. Most often used for testing web-applications, Selenium may be used for any task that requires automating interaction with the browser.

Installation

Selenium may be installed via npm with

npm install selenium-webdriver
+    
On this page

selenium-webdriver

Selenium is a browser automation library. Most often used for testing web-applications, Selenium may be used for any task that requires automating interaction with the browser.

Installation

Selenium may be installed via npm with

npm install selenium-webdriver
 

You will need to download additional components to work with each of the major browsers. The drivers for Chrome, Firefox, and Microsoft's IE and Edge web browsers are all standalone executables that should be placed on your system PATH. Apple's safaridriver (v10 and above) can be found at the following path – /usr/bin/safaridriver. To enable automation on safari, you need to run command safaridriver --enable.

BrowserComponent
Chromechromedriver(.exe)
Internet ExplorerIEDriverServer.exe
EdgeMicrosoftWebDriver.msi
Firefoxgeckodriver(.exe)
Operaoperadriver(.exe)
Safarisafaridriver

Usage

The sample below and others are included in the example directory. You may also find the tests for selenium-webdriver informative.

const { Builder, Browser, By, Key, until } = require('selenium-webdriver')
 
 ;(async function example() {
@@ -32,4 +32,4 @@
   .usingServer('http://localhost:4444/wd/hub')
   .build()
 

Or change the Builder's configuration at runtime with the SELENIUM_REMOTE_URL environment variable:

SELENIUM_REMOTE_URL="http://localhost:4444/wd/hub" node script.js
-

You can experiment with these options using the example/google_search.js script provided with selenium-webdriver.

Documentation

API documentation is available online from the Selenium project. Additional resources include

Contributing

Contributions are accepted either through GitHub pull requests or patches via the Selenium issue tracker.

Node Support Policy

Each version of selenium-webdriver will support the latest semver-minor version of the LTS and stable Node releases. All semver-major & semver-minor versions between the LTS and stable release will have "best effort" support. Following a Selenium release, any semver-minor Node releases will also have "best effort" support. Releases older than the latest LTS, semver-major releases, and all unstable release branches (e.g. "v.Next") are considered strictly unsupported.

For example, suppose the current LTS and stable releases are v22.13.0 and v23.6.0, respectively. Then a Selenium release would have the following support levels:

VersionSupport
<= 16.20.2unsupported
16.20.2supported
18.8.0supported
>= 22.13.0best effort
v.Nextunsupported

Support Level Definitions

  • supported: A selenium-webdriver release will be API compatible with the platform API, without the use of runtime flags.

  • best effort: Bugs will be investigated as time permits. API compatibility is only guaranteed where required by a supported release. This effectively means the adoption of new JS features, such as ES2015 modules, will depend on what is supported in Node's LTS.

  • unsupported: Bug submissions will be closed as will-not-fix and API compatibility is not guaranteed.

Projected Support Schedule

If Node releases a new LTS each October and a new major version every 6 months, the support window for selenium-webdriver will be roughly:

ReleaseStatusEND-OF-LIFE
v18.xMaintenance LTS2025-04-30
v19.xEnd-of-Life2023-06-01
v20.xMaintenance LTS2026-04-30
v21.xEnd-of-Life2024-06-01
V22.xActive LTS2027-04-30
V23.xCurrent2025-06-01

Issues

Please report any issues using the Selenium issue tracker. When using the issue tracker

  • Do include a detailed description of the problem.
  • Do include a link to a gist with any interesting stack traces/logs (you may also attach these directly to the bug report).
  • Do include a reduced test case. Reporting "unable to find element on the page" is not a valid report - there's nothing for us to look into. Expect your bug report to be closed if you do not provide enough information for us to investigate.
  • Do not use the issue tracker to submit basic help requests. All help inquiries should be directed to the user forum or #selenium IRC channel.
  • Do not post empty "I see this too" or "Any updates?" comments. These provide no additional information and clutter the log.
  • Do not report regressions on closed bugs as they are not actively monitored for updates (especially bugs that are >6 months old). Please open a new issue and reference the original bug in your report.

License

Licensed to the Software Freedom Conservancy (SFC) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The SFC licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Selenium WebDriver JavaScript API
\ No newline at end of file +

You can experiment with these options using the example/google_search.js script provided with selenium-webdriver.

Documentation

API documentation is available online from the Selenium project. Additional resources include

Contributing

Contributions are accepted either through GitHub pull requests or patches via the Selenium issue tracker.

Node Support Policy

Each version of selenium-webdriver will support the latest semver-minor version of the LTS and stable Node releases. All semver-major & semver-minor versions between the LTS and stable release will have "best effort" support. Following a Selenium release, any semver-minor Node releases will also have "best effort" support. Releases older than the latest LTS, semver-major releases, and all unstable release branches (e.g. "v.Next") are considered strictly unsupported.

For example, suppose the current LTS and stable releases are v22.13.0 and v23.6.0, respectively. Then a Selenium release would have the following support levels:

VersionSupport
<= 16.20.2unsupported
16.20.2supported
18.8.0supported
>= 22.13.0best effort
v.Nextunsupported

Support Level Definitions

  • supported: A selenium-webdriver release will be API compatible with the platform API, without the use of runtime flags.

  • best effort: Bugs will be investigated as time permits. API compatibility is only guaranteed where required by a supported release. This effectively means the adoption of new JS features, such as ES2015 modules, will depend on what is supported in Node's LTS.

  • unsupported: Bug submissions will be closed as will-not-fix and API compatibility is not guaranteed.

Projected Support Schedule

If Node releases a new LTS each October and a new major version every 6 months, the support window for selenium-webdriver will be roughly:

ReleaseStatusEND-OF-LIFE
v18.xMaintenance LTS2025-04-30
v19.xEnd-of-Life2023-06-01
v20.xMaintenance LTS2026-04-30
v21.xEnd-of-Life2024-06-01
V22.xActive LTS2027-04-30
V23.xCurrent2025-06-01

Issues

Please report any issues using the Selenium issue tracker. When using the issue tracker

  • Do include a detailed description of the problem.
  • Do include a link to a gist with any interesting stack traces/logs (you may also attach these directly to the bug report).
  • Do include a reduced test case. Reporting "unable to find element on the page" is not a valid report - there's nothing for us to look into. Expect your bug report to be closed if you do not provide enough information for us to investigate.
  • Do not use the issue tracker to submit basic help requests. All help inquiries should be directed to the user forum or #selenium IRC channel.
  • Do not post empty "I see this too" or "Any updates?" comments. These provide no additional information and clutter the log.
  • Do not report regressions on closed bugs as they are not actively monitored for updates (especially bugs that are >6 months old). Please open a new issue and reference the original bug in your report.

License

Licensed to the Software Freedom Conservancy (SFC) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The SFC licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/index.js.html b/docs/api/javascript/index.js.html index d6f39ee692900..3a88c82920bd7 100644 --- a/docs/api/javascript/index.js.html +++ b/docs/api/javascript/index.js.html @@ -1,6 +1,6 @@ Source: index.js
On this page

index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -798,4 +798,4 @@
 exports.ScriptManager = ScriptManager
 exports.NetworkInspector = NetworkInspector
 exports.version = version
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/io_exec.js.html b/docs/api/javascript/io_exec.js.html index 56096db59129d..4f565b6ee12d7 100644 --- a/docs/api/javascript/io_exec.js.html +++ b/docs/api/javascript/io_exec.js.html @@ -1,6 +1,6 @@ Source: io/exec.js
On this page

io_exec.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

io_exec.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -169,4 +169,4 @@
   Result,
   exec,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/io_index.js.html b/docs/api/javascript/io_index.js.html index 5526a31b3e45c..4b5648b277554 100644 --- a/docs/api/javascript/io_index.js.html +++ b/docs/api/javascript/io_index.js.html @@ -1,6 +1,6 @@ Source: io/index.js
On this page

io_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

io_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -352,4 +352,4 @@
   exists,
   stat,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/io_zip.js.html b/docs/api/javascript/io_zip.js.html index f0cd00c5efc40..55bd134bddd37 100644 --- a/docs/api/javascript/io_zip.js.html +++ b/docs/api/javascript/io_zip.js.html @@ -1,6 +1,6 @@ Source: io/zip.js
On this page

io_zip.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

io_zip.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -199,4 +199,4 @@
 
 // PUBLIC API
 module.exports = { Zip, load, unzip }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_by.js.html b/docs/api/javascript/lib_by.js.html index 95a42f473a46a..a9a4cfbea5fcf 100644 --- a/docs/api/javascript/lib_by.js.html +++ b/docs/api/javascript/lib_by.js.html @@ -1,6 +1,6 @@ Source: lib/by.js
On this page

lib_by.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_by.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -481,4 +481,4 @@
   escapeCss,
   checkedLocator: check,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_capabilities.js.html b/docs/api/javascript/lib_capabilities.js.html index f2c2d276e4276..915e5bf1ad011 100644 --- a/docs/api/javascript/lib_capabilities.js.html +++ b/docs/api/javascript/lib_capabilities.js.html @@ -1,6 +1,6 @@ Source: lib/capabilities.js
On this page

lib_capabilities.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_capabilities.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -555,4 +555,4 @@
   Timeouts,
   UserPromptHandler,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_command.js.html b/docs/api/javascript/lib_command.js.html index 2cadb55e32821..052332c594923 100644 --- a/docs/api/javascript/lib_command.js.html +++ b/docs/api/javascript/lib_command.js.html @@ -1,6 +1,6 @@ Source: lib/command.js
On this page

lib_command.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_command.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -225,4 +225,4 @@
   Name,
   Executor,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_error.js.html b/docs/api/javascript/lib_error.js.html index 241279b1fc49c..ca75c5274e283 100644 --- a/docs/api/javascript/lib_error.js.html +++ b/docs/api/javascript/lib_error.js.html @@ -1,6 +1,6 @@ Source: lib/error.js
On this page

lib_error.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_error.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -603,4 +603,4 @@
   isErrorResponse,
   throwDecodedError,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_http.js.html b/docs/api/javascript/lib_http.js.html index ca92b12685d3f..ffcdcd68e1d95 100644 --- a/docs/api/javascript/lib_http.js.html +++ b/docs/api/javascript/lib_http.js.html @@ -1,6 +1,6 @@ Source: lib/http.js
On this page

lib_http.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_http.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -587,4 +587,4 @@
   // Exported for testing.
   buildPath,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_input.js.html b/docs/api/javascript/lib_input.js.html index 3bf44e17ffb83..4bb93dd8ee862 100644 --- a/docs/api/javascript/lib_input.js.html +++ b/docs/api/javascript/lib_input.js.html @@ -1,6 +1,6 @@ Source: lib/input.js
On this page

lib_input.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_input.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -1050,4 +1050,4 @@
   Pointer,
   INTERNAL_COMPUTE_OFFSET_SCRIPT,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_logging.js.html b/docs/api/javascript/lib_logging.js.html index 33125ccdd8bf9..dfeeb57f0bd07 100644 --- a/docs/api/javascript/lib_logging.js.html +++ b/docs/api/javascript/lib_logging.js.html @@ -1,6 +1,6 @@ Source: lib/logging.js
On this page

lib_logging.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_logging.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -653,4 +653,4 @@
   installConsoleHandler: installConsoleHandler,
   removeConsoleHandler: removeConsoleHandler,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_promise.js.html b/docs/api/javascript/lib_promise.js.html index 10cfa531291c3..ee27be9be2ec2 100644 --- a/docs/api/javascript/lib_promise.js.html +++ b/docs/api/javascript/lib_promise.js.html @@ -1,6 +1,6 @@ Source: lib/promise.js
On this page

lib_promise.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_promise.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -266,4 +266,4 @@
   isPromise,
   map,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_proxy.js.html b/docs/api/javascript/lib_proxy.js.html index 6f6d6588e9d56..75342faeadf96 100644 --- a/docs/api/javascript/lib_proxy.js.html +++ b/docs/api/javascript/lib_proxy.js.html @@ -1,6 +1,6 @@ Source: lib/proxy.js
On this page

lib_proxy.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_proxy.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -222,4 +222,4 @@
   manual,
   direct,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_select.js.html b/docs/api/javascript/lib_select.js.html index 432800262173d..9054f1e0849b9 100644 --- a/docs/api/javascript/lib_select.js.html +++ b/docs/api/javascript/lib_select.js.html @@ -1,6 +1,6 @@ Source: lib/select.js
On this page

lib_select.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_select.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -502,4 +502,4 @@
 }
 
 module.exports = { Select, escapeQuotes }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_session.js.html b/docs/api/javascript/lib_session.js.html index abd1b5575110f..129214bd43a33 100644 --- a/docs/api/javascript/lib_session.js.html +++ b/docs/api/javascript/lib_session.js.html @@ -1,6 +1,6 @@ Source: lib/session.js
On this page

lib_session.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_session.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -77,4 +77,4 @@
 // PUBLIC API
 
 module.exports = { Session }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_symbols.js.html b/docs/api/javascript/lib_symbols.js.html index 1de0d63875e71..5608fa2863ab8 100644 --- a/docs/api/javascript/lib_symbols.js.html +++ b/docs/api/javascript/lib_symbols.js.html @@ -1,6 +1,6 @@ Source: lib/symbols.js
On this page

lib_symbols.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_symbols.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -37,4 +37,4 @@
    */
   serialize: Symbol('serialize'),
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_test_build.js.html b/docs/api/javascript/lib_test_build.js.html index fa0d62ec62af1..3c9f06f000d62 100644 --- a/docs/api/javascript/lib_test_build.js.html +++ b/docs/api/javascript/lib_test_build.js.html @@ -1,6 +1,6 @@ Source: lib/test/build.js
On this page

lib_test_build.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_test_build.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -147,4 +147,4 @@
 exports.projectRoot = function () {
   return PROJECT_ROOT
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_test_fileserver.js.html b/docs/api/javascript/lib_test_fileserver.js.html index 82ba32852a7c8..ca0661b7a445f 100644 --- a/docs/api/javascript/lib_test_fileserver.js.html +++ b/docs/api/javascript/lib_test_fileserver.js.html @@ -1,6 +1,6 @@ Source: lib/test/fileserver.js
On this page

lib_test_fileserver.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_test_fileserver.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -381,4 +381,4 @@
     console.log('Server running at ' + server.url())
   })
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_test_httpserver.js.html b/docs/api/javascript/lib_test_httpserver.js.html index 1d2fa0852becf..bcdc9a7e4f0dc 100644 --- a/docs/api/javascript/lib_test_httpserver.js.html +++ b/docs/api/javascript/lib_test_httpserver.js.html @@ -1,6 +1,6 @@ Source: lib/test/httpserver.js
On this page

lib_test_httpserver.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_test_httpserver.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -115,4 +115,4 @@
 // PUBLIC API
 
 exports.Server = Server
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_test_index.js.html b/docs/api/javascript/lib_test_index.js.html index afa2056dc6f2e..eebe4c3c7cfaa 100644 --- a/docs/api/javascript/lib_test_index.js.html +++ b/docs/api/javascript/lib_test_index.js.html @@ -1,6 +1,6 @@ Source: lib/test/index.js
On this page

lib_test_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_test_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -79,4 +79,4 @@
 exports.ignore = testing.ignore
 exports.Pages = fileserver.Pages
 exports.whereIs = fileserver.whereIs
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_test_resources.js.html b/docs/api/javascript/lib_test_resources.js.html index cfe0b13635fed..a292136dd7ca1 100644 --- a/docs/api/javascript/lib_test_resources.js.html +++ b/docs/api/javascript/lib_test_resources.js.html @@ -1,6 +1,6 @@ Source: lib/test/resources.js
On this page

lib_test_resources.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_test_resources.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -46,4 +46,4 @@
 
   throw Error('File does not exist: ' + filePath)
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_until.js.html b/docs/api/javascript/lib_until.js.html index 73d470e35b715..0b6fb697b2248 100644 --- a/docs/api/javascript/lib_until.js.html +++ b/docs/api/javascript/lib_until.js.html @@ -1,6 +1,6 @@ Source: lib/until.js
On this page

lib_until.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_until.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -431,4 +431,4 @@
   alertIsPresent,
   titleIs,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_util.js.html b/docs/api/javascript/lib_util.js.html index 58ab8360173bc..256f72c458470 100644 --- a/docs/api/javascript/lib_util.js.html +++ b/docs/api/javascript/lib_util.js.html @@ -1,6 +1,6 @@ Source: lib/util.js
On this page

lib_util.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_util.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -50,4 +50,4 @@
   isObject,
   isPromise,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_virtual_authenticator.js.html b/docs/api/javascript/lib_virtual_authenticator.js.html index a640781b24a87..d4433582fab0a 100644 --- a/docs/api/javascript/lib_virtual_authenticator.js.html +++ b/docs/api/javascript/lib_virtual_authenticator.js.html @@ -1,6 +1,6 @@ Source: lib/virtual_authenticator.js
On this page

lib_virtual_authenticator.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_virtual_authenticator.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -236,4 +236,4 @@
   Transport,
   Protocol,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_webdriver.js.html b/docs/api/javascript/lib_webdriver.js.html index c43db78e38b50..7b6f2e924906c 100644 --- a/docs/api/javascript/lib_webdriver.js.html +++ b/docs/api/javascript/lib_webdriver.js.html @@ -1,6 +1,6 @@ Source: lib/webdriver.js
On this page

lib_webdriver.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_webdriver.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -1246,9 +1246,7 @@
     const caps = await this.getCapabilities()
 
     if (caps['map_'].get('browserName') === 'firefox') {
-      console.warn(
-        'CDP support for Firefox is deprecated and will be removed in future versions. Please switch to WebDriver BiDi.',
-      )
+      throw new Error('CDP support for Firefox is removed. Please switch to WebDriver BiDi.')
     }
 
     if (process.env.SELENIUM_REMOTE_URL) {
@@ -1257,11 +1255,7 @@
       debuggerUrl = `ws://${host}/session/${sessionId}/se/cdp`
     } else {
       const seCdp = caps['map_'].get('se:cdp')
-      const vendorInfo =
-        caps['map_'].get('goog:chromeOptions') ||
-        caps['map_'].get('ms:edgeOptions') ||
-        caps['map_'].get('moz:debuggerAddress') ||
-        new Map()
+      const vendorInfo = caps['map_'].get('goog:chromeOptions') || caps['map_'].get('ms:edgeOptions') || new Map()
       debuggerUrl = seCdp || vendorInfo['debuggerAddress'] || vendorInfo
     }
     this._wsUrl = await this.getWsUrl(debuggerUrl, target, caps)
@@ -3395,4 +3389,4 @@
   WebElementPromise,
   Window,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/lib_webelement.js.html b/docs/api/javascript/lib_webelement.js.html index 98b95028075ce..c5071cf2afef1 100644 --- a/docs/api/javascript/lib_webelement.js.html +++ b/docs/api/javascript/lib_webelement.js.html @@ -1,6 +1,6 @@ Source: lib/webelement.js
On this page

lib_webelement.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

lib_webelement.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -62,4 +62,4 @@
   isId,
   extractId,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_chrome-Driver.html b/docs/api/javascript/module-selenium-webdriver_chrome-Driver.html index 76267c824053d..dfc4a85129c78 100644 --- a/docs/api/javascript/module-selenium-webdriver_chrome-Driver.html +++ b/docs/api/javascript/module-selenium-webdriver_chrome-Driver.html @@ -1,3 +1,3 @@ Class: Driver
On this page

selenium-webdriver/chrome~ Driver

Creates a new WebDriver client for Chrome.

Constructor

new Driver()

Methods

(static) createSession(opt_configopt, opt_serviceExecutoropt) → (non-null) {Driver}

Creates a new session with the ChromeDriver.

Parameters:
NameTypeAttributesDescription
opt_configCapabilities | Options<optional>

The configuration options.

opt_serviceExecutorremote.DriverService | http.Executor<optional>

Either a DriverService to use for the remote end, or a preconfigured executor for an externally managed endpoint. If neither is provided, the default service will be used by default.

Returns:

A new driver instance.

Type: 
Driver

(static) getDefaultService() → {remote.DriverService}

returns new instance chrome driver service

Returns:
Type: 
remote.DriverService
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/chrome~ Driver

Creates a new WebDriver client for Chrome.

Constructor

new Driver()

Methods

(static) createSession(opt_configopt, opt_serviceExecutoropt) → (non-null) {Driver}

Creates a new session with the ChromeDriver.

Parameters:
NameTypeAttributesDescription
opt_configCapabilities | Options<optional>

The configuration options.

opt_serviceExecutorremote.DriverService | http.Executor<optional>

Either a DriverService to use for the remote end, or a preconfigured executor for an externally managed endpoint. If neither is provided, the default service will be used by default.

Returns:

A new driver instance.

Type: 
Driver

(static) getDefaultService() → {remote.DriverService}

returns new instance chrome driver service

Returns:
Type: 
remote.DriverService
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_chrome-Options.html b/docs/api/javascript/module-selenium-webdriver_chrome-Options.html index 9df243bb7fb1a..bcdb68d5953b3 100644 --- a/docs/api/javascript/module-selenium-webdriver_chrome-Options.html +++ b/docs/api/javascript/module-selenium-webdriver_chrome-Options.html @@ -1,3 +1,3 @@ Class: Options
On this page

selenium-webdriver/chrome~ Options

Class for managing ChromeDriver specific options.

Constructor

new Options()

Methods

androidChrome() → (non-null) {Options}

Configures the ChromeDriver to launch Chrome on Android via adb. This function is shorthand for options.androidPackage('com.android.chrome').

Returns:

A self reference.

Type: 
Options

setChromeBinaryPath(path) → (non-null) {Options}

Sets the path to the Chrome binary to use. On Mac OS X, this path should reference the actual Chrome executable, not just the application binary (e.g. "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome").

The binary path be absolute or relative to the chromedriver server executable, but it must exist on the machine that will launch Chrome.

Parameters:
NameTypeDescription
pathstring

The path to the Chrome binary to use.

Returns:

A self reference.

Type: 
Options

setChromeLogFile(path) → (non-null) {Options}

Sets the path to Chrome's log file. This path should exist on the machine that will launch Chrome.

Parameters:
NameTypeDescription
pathstring

Path to the log file to use.

Returns:

A self reference.

Type: 
Options

setChromeMinidumpPath(path) → (non-null) {Options}

Sets the directory to store Chrome minidumps in. This option is only supported when ChromeDriver is running on Linux.

Parameters:
NameTypeDescription
pathstring

The directory path.

Returns:

A self reference.

Type: 
Options
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/chrome~ Options

Class for managing ChromeDriver specific options.

Constructor

new Options()

Methods

androidChrome() → (non-null) {Options}

Configures the ChromeDriver to launch Chrome on Android via adb. This function is shorthand for options.androidPackage('com.android.chrome').

Returns:

A self reference.

Type: 
Options

setChromeBinaryPath(path) → (non-null) {Options}

Sets the path to the Chrome binary to use. On Mac OS X, this path should reference the actual Chrome executable, not just the application binary (e.g. "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome").

The binary path be absolute or relative to the chromedriver server executable, but it must exist on the machine that will launch Chrome.

Parameters:
NameTypeDescription
pathstring

The path to the Chrome binary to use.

Returns:

A self reference.

Type: 
Options

setChromeLogFile(path) → (non-null) {Options}

Sets the path to Chrome's log file. This path should exist on the machine that will launch Chrome.

Parameters:
NameTypeDescription
pathstring

Path to the log file to use.

Returns:

A self reference.

Type: 
Options

setChromeMinidumpPath(path) → (non-null) {Options}

Sets the directory to store Chrome minidumps in. This option is only supported when ChromeDriver is running on Linux.

Parameters:
NameTypeDescription
pathstring

The directory path.

Returns:

A self reference.

Type: 
Options
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_chrome-ServiceBuilder.html b/docs/api/javascript/module-selenium-webdriver_chrome-ServiceBuilder.html index 1336679d9794f..1b33161e61acb 100644 --- a/docs/api/javascript/module-selenium-webdriver_chrome-ServiceBuilder.html +++ b/docs/api/javascript/module-selenium-webdriver_chrome-ServiceBuilder.html @@ -1,3 +1,3 @@ Class: ServiceBuilder
On this page

selenium-webdriver/chrome~ ServiceBuilder

Creates selenium-webdriver/remote.DriverService instances that manage a ChromeDriver server in a child process.

Constructor

new ServiceBuilder(opt_exeopt)

Parameters:
NameTypeAttributesDescription
opt_exestring<optional>

Path to the server executable to use. If omitted, the builder will attempt to locate the chromedriver on the current PATH. If the chromedriver is not available in path, selenium-manager will download the chromedriver

Throws:

If provided executable does not exist, or the chromedriver cannot be found on the PATH.

Type
Error
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/chrome~ ServiceBuilder

Creates selenium-webdriver/remote.DriverService instances that manage a ChromeDriver server in a child process.

Constructor

new ServiceBuilder(opt_exeopt)

Parameters:
NameTypeAttributesDescription
opt_exestring<optional>

Path to the server executable to use. If omitted, the builder will attempt to locate the chromedriver on the current PATH. If the chromedriver is not available in path, selenium-manager will download the chromedriver

Throws:

If provided executable does not exist, or the chromedriver cannot be found on the PATH.

Type
Error
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_chrome.html b/docs/api/javascript/module-selenium-webdriver_chrome.html index d9c02314dceb1..bd568ff91b146 100644 --- a/docs/api/javascript/module-selenium-webdriver_chrome.html +++ b/docs/api/javascript/module-selenium-webdriver_chrome.html @@ -1,6 +1,6 @@ Module: selenium-webdriver/chrome
On this page

selenium-webdriver/chrome

Defines a WebDriver client for the Chrome web browser. Before using this module, you must download the latest ChromeDriver release and ensure it can be found on your system PATH.

There are three primary classes exported by this module:

  1. ServiceBuilder: configures the remote.DriverService that manages the ChromeDriver child process.

  2. Options: defines configuration options for each new Chrome session, such as which proxy to use, what extensions to install, or what command-line switches to use when starting the browser.

  3. Driver: the WebDriver client; each new instance will control a unique browser session with a clean user profile (unless otherwise configured through the Options class).

    let chrome = require('selenium-webdriver/chrome'); let {Builder} = require('selenium-webdriver');

    let driver = new Builder() .forBrowser('chrome') .setChromeOptions(new chrome.Options()) .build();

Customizing the ChromeDriver Server

By default, every Chrome session will use a single driver service, which is started the first time a Driver instance is created and terminated when this process exits. The default service will inherit its environment from the current process and direct all output to /dev/null. You may obtain a handle to this default service using getDefaultService() and change its configuration with setDefaultService().

You may also create a Driver with its own driver service. This is useful if you need to capture the server's log output for a specific session:

let chrome = require('selenium-webdriver/chrome');
+    
On this page

selenium-webdriver/chrome

Defines a WebDriver client for the Chrome web browser. Before using this module, you must download the latest ChromeDriver release and ensure it can be found on your system PATH.

There are three primary classes exported by this module:

  1. ServiceBuilder: configures the remote.DriverService that manages the ChromeDriver child process.

  2. Options: defines configuration options for each new Chrome session, such as which proxy to use, what extensions to install, or what command-line switches to use when starting the browser.

  3. Driver: the WebDriver client; each new instance will control a unique browser session with a clean user profile (unless otherwise configured through the Options class).

    let chrome = require('selenium-webdriver/chrome'); let {Builder} = require('selenium-webdriver');

    let driver = new Builder() .forBrowser('chrome') .setChromeOptions(new chrome.Options()) .build();

Customizing the ChromeDriver Server

By default, every Chrome session will use a single driver service, which is started the first time a Driver instance is created and terminated when this process exits. The default service will inherit its environment from the current process and direct all output to /dev/null. You may obtain a handle to this default service using getDefaultService() and change its configuration with setDefaultService().

You may also create a Driver with its own driver service. This is useful if you need to capture the server's log output for a specific session:

let chrome = require('selenium-webdriver/chrome');
 
 let service = new chrome.ServiceBuilder()
     .loggingTo('/my/log/file.txt')
@@ -26,4 +26,4 @@
         .androidPackage('com.example')
         .androidActivity('com.example.Activity'))
     .build();
-

[Refer to the ChromeDriver site] for more information on using the ChromeDriver with Android.

Classes

Driver
Options
ServiceBuilder
Selenium WebDriver JavaScript API
\ No newline at end of file +

[Refer to the ChromeDriver site] for more information on using the ChromeDriver with Android.

Classes

Driver
Options
ServiceBuilder
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html b/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html index 4c420c04b748c..65458c38abf24 100644 --- a/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html +++ b/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html @@ -1,3 +1,3 @@ Class: Driver
On this page

selenium-webdriver/chromium~ Driver

Creates a new WebDriver client for Chromium-based browsers.

Constructor

new Driver()

Methods

deleteNetworkConditions() → (non-null) {Promise}

Schedules a command to delete Chromium network emulation settings.

Returns:

A promise that will be resolved when network emulation settings have been deleted.

Type: 
Promise

getCastIssueMessage() → (non-null) {promise.Thenable.<void>}

Returns an error message when there is any issue in a Cast session.

Returns:

A promise that will be resolved when the mirror command has been issued to the device.

Type: 
promise.Thenable.<void>

getCastSinks() → (non-null) {promise.Thenable.<void>}

Returns the list of cast sinks (Cast devices) available to the Chrome media router.

Returns:

A promise that will be resolved with an array of Strings containing the friendly device names of available cast sink targets.

Type: 
promise.Thenable.<void>

getNetworkConditions() → (non-null) {Promise}

Schedules a command to get Chromium network emulation settings.

Returns:

A promise that will be resolved when network emulation settings are retrieved.

Type: 
Promise

launchApp(id) → (non-null) {Promise.<void>}

Schedules a command to launch Chrome App with given ID.

Parameters:
NameTypeDescription
idstring

ID of the App to launch.

Returns:

A promise that will be resolved when app is launched.

Type: 
Promise.<void>

sendAndGetDevToolsCommand(cmd, paramsopt) → (non-null) {Promise.<string>}

Sends an arbitrary devtools command to the browser and get the result.

Parameters:
NameTypeAttributesDescription
cmdstring

The name of the command to send.

paramsObject<optional>

The command parameters.

Returns:

A promise that will be resolved when the command has finished.

Type: 
Promise.<string>

sendDevToolsCommand(cmd, paramsopt) → (non-null) {Promise.<void>}

Sends an arbitrary devtools command to the browser.

Parameters:
NameTypeAttributesDescription
cmdstring

The name of the command to send.

paramsObject<optional>

The command parameters.

Returns:

A promise that will be resolved when the command has finished.

Type: 
Promise.<void>

setCastSinkToUse(deviceName) → (non-null) {promise.Thenable.<void>}

Selects a cast sink (Cast device) as the recipient of media router intents (connect or play).

Parameters:
NameTypeDescription
deviceNameString

name of the target device.

Returns:

A promise that will be resolved when the target device has been selected to respond further webdriver commands.

Type: 
promise.Thenable.<void>

(async) setDownloadPath(path) → (non-null) {Promise.<void>}

Sends a DevTools command to change the browser's download directory.

Parameters:
NameTypeDescription
pathstring

The desired download directory.

Returns:

A promise that will be resolved when the command has finished.

Type: 
Promise.<void>

setFileDetector()

This function is a no-op as file detectors are not supported by this implementation.

setNetworkConditions(spec) → (non-null) {Promise.<void>}

Schedules a command to set Chromium network emulation settings.

Sample Usage:

driver.setNetworkConditions({ offline: false, latency: 5, // Additional latency (ms). download_throughput: 500 * 1024, // Maximal aggregated download throughput. upload_throughput: 500 * 1024 // Maximal aggregated upload throughput. });

Parameters:
NameTypeDescription
specObject

Defines the network conditions to set

Returns:

A promise that will be resolved when network emulation settings are set.

Type: 
Promise.<void>

setPermission(name, state) → (non-null) {Promise.<Object>}

Set a permission state to the given value.

Parameters:
NameTypeDescription
namestring

A name of the permission to update.

state"granted" | "denied" | "prompt"

State to set permission to.

Returns:

A promise that will be resolved when the command has finished.

Type: 
Promise.<Object>

startCastTabMirroring(deviceName) → (non-null) {promise.Thenable.<void>}

Initiates tab mirroring for the current browser tab on the specified device.

Parameters:
NameTypeDescription
deviceNameString

name of the target device.

Returns:

A promise that will be resolved when the mirror command has been issued to the device.

Type: 
promise.Thenable.<void>

startDesktopMirroring(deviceName) → (non-null) {promise.Thenable.<void>}

Initiates desktop mirroring for the current browser tab on the specified device.

Parameters:
NameTypeDescription
deviceNameString

name of the target device.

Returns:

A promise that will be resolved when the mirror command has been issued to the device.

Type: 
promise.Thenable.<void>

stopCasting(deviceName) → (non-null) {promise.Thenable.<void>}

Stops casting from media router to the specified device, if connected.

Parameters:
NameTypeDescription
deviceNameString

name of the target device.

Returns:

A promise that will be resolved when the stop command has been issued to the device.

Type: 
promise.Thenable.<void>

(static) createSession(capsopt, opt_serviceExecutoropt, vendorPrefix, vendorCapabilityKey) → (non-null) {Driver}

Creates a new session with the WebDriver server.

Parameters:
NameTypeAttributesDescription
capsCapabilities | Options<optional>

The configuration options.

opt_serviceExecutorremote.DriverService | http.Executor<optional>

Either a DriverService to use for the remote end, or a preconfigured executor for an externally managed endpoint. If neither is provided, the default service will be used by default.

vendorPrefix

Either 'goog' or 'ms'

vendorCapabilityKey

Either 'goog:chromeOptions' or 'ms:edgeOptions'

Returns:

A new driver instance.

Type: 
Driver
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/chromium~ Driver

Creates a new WebDriver client for Chromium-based browsers.

Constructor

new Driver()

Methods

deleteNetworkConditions() → (non-null) {Promise}

Schedules a command to delete Chromium network emulation settings.

Returns:

A promise that will be resolved when network emulation settings have been deleted.

Type: 
Promise

getCastIssueMessage() → (non-null) {promise.Thenable.<void>}

Returns an error message when there is any issue in a Cast session.

Returns:

A promise that will be resolved when the mirror command has been issued to the device.

Type: 
promise.Thenable.<void>

getCastSinks() → (non-null) {promise.Thenable.<void>}

Returns the list of cast sinks (Cast devices) available to the Chrome media router.

Returns:

A promise that will be resolved with an array of Strings containing the friendly device names of available cast sink targets.

Type: 
promise.Thenable.<void>

getNetworkConditions() → (non-null) {Promise}

Schedules a command to get Chromium network emulation settings.

Returns:

A promise that will be resolved when network emulation settings are retrieved.

Type: 
Promise

launchApp(id) → (non-null) {Promise.<void>}

Schedules a command to launch Chrome App with given ID.

Parameters:
NameTypeDescription
idstring

ID of the App to launch.

Returns:

A promise that will be resolved when app is launched.

Type: 
Promise.<void>

sendAndGetDevToolsCommand(cmd, paramsopt) → (non-null) {Promise.<string>}

Sends an arbitrary devtools command to the browser and get the result.

Parameters:
NameTypeAttributesDescription
cmdstring

The name of the command to send.

paramsObject<optional>

The command parameters.

Returns:

A promise that will be resolved when the command has finished.

Type: 
Promise.<string>

sendDevToolsCommand(cmd, paramsopt) → (non-null) {Promise.<void>}

Sends an arbitrary devtools command to the browser.

Parameters:
NameTypeAttributesDescription
cmdstring

The name of the command to send.

paramsObject<optional>

The command parameters.

Returns:

A promise that will be resolved when the command has finished.

Type: 
Promise.<void>

setCastSinkToUse(deviceName) → (non-null) {promise.Thenable.<void>}

Selects a cast sink (Cast device) as the recipient of media router intents (connect or play).

Parameters:
NameTypeDescription
deviceNameString

name of the target device.

Returns:

A promise that will be resolved when the target device has been selected to respond further webdriver commands.

Type: 
promise.Thenable.<void>

(async) setDownloadPath(path) → (non-null) {Promise.<void>}

Sends a DevTools command to change the browser's download directory.

Parameters:
NameTypeDescription
pathstring

The desired download directory.

Returns:

A promise that will be resolved when the command has finished.

Type: 
Promise.<void>

setFileDetector()

This function is a no-op as file detectors are not supported by this implementation.

setNetworkConditions(spec) → (non-null) {Promise.<void>}

Schedules a command to set Chromium network emulation settings.

Sample Usage:

driver.setNetworkConditions({ offline: false, latency: 5, // Additional latency (ms). download_throughput: 500 * 1024, // Maximal aggregated download throughput. upload_throughput: 500 * 1024 // Maximal aggregated upload throughput. });

Parameters:
NameTypeDescription
specObject

Defines the network conditions to set

Returns:

A promise that will be resolved when network emulation settings are set.

Type: 
Promise.<void>

setPermission(name, state) → (non-null) {Promise.<Object>}

Set a permission state to the given value.

Parameters:
NameTypeDescription
namestring

A name of the permission to update.

state"granted" | "denied" | "prompt"

State to set permission to.

Returns:

A promise that will be resolved when the command has finished.

Type: 
Promise.<Object>

startCastTabMirroring(deviceName) → (non-null) {promise.Thenable.<void>}

Initiates tab mirroring for the current browser tab on the specified device.

Parameters:
NameTypeDescription
deviceNameString

name of the target device.

Returns:

A promise that will be resolved when the mirror command has been issued to the device.

Type: 
promise.Thenable.<void>

startDesktopMirroring(deviceName) → (non-null) {promise.Thenable.<void>}

Initiates desktop mirroring for the current browser tab on the specified device.

Parameters:
NameTypeDescription
deviceNameString

name of the target device.

Returns:

A promise that will be resolved when the mirror command has been issued to the device.

Type: 
promise.Thenable.<void>

stopCasting(deviceName) → (non-null) {promise.Thenable.<void>}

Stops casting from media router to the specified device, if connected.

Parameters:
NameTypeDescription
deviceNameString

name of the target device.

Returns:

A promise that will be resolved when the stop command has been issued to the device.

Type: 
promise.Thenable.<void>

(static) createSession(capsopt, opt_serviceExecutoropt, vendorPrefix, vendorCapabilityKey) → (non-null) {Driver}

Creates a new session with the WebDriver server.

Parameters:
NameTypeAttributesDescription
capsCapabilities | Options<optional>

The configuration options.

opt_serviceExecutorremote.DriverService | http.Executor<optional>

Either a DriverService to use for the remote end, or a preconfigured executor for an externally managed endpoint. If neither is provided, the default service will be used by default.

vendorPrefix

Either 'goog' or 'ms'

vendorCapabilityKey

Either 'goog:chromeOptions' or 'ms:edgeOptions'

Returns:

A new driver instance.

Type: 
Driver
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_chromium-Extensions.html b/docs/api/javascript/module-selenium-webdriver_chromium-Extensions.html index 6049860080dcc..6ae43bc2aadc6 100644 --- a/docs/api/javascript/module-selenium-webdriver_chromium-Extensions.html +++ b/docs/api/javascript/module-selenium-webdriver_chromium-Extensions.html @@ -1,3 +1,3 @@ Class: Extensions
On this page

selenium-webdriver/chromium~ Extensions

A list of extensions to install when launching the browser.

Constructor

new Extensions()

Members

length

Methods

Symbols.serialize() → (non-null) {Object}

Returns:

A serialized representation of this Extensions object.

Type: 
Object

add(…args)

Add additional extensions to install when launching the browser. Each extension should be specified as the path to the packed CRX file, or a Buffer for an extension.

Parameters:
NameTypeAttributesDescription
argsstring | Buffer | !Array.<(string|!Buffer)><repeatable>

The extensions to add.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/chromium~ Extensions

A list of extensions to install when launching the browser.

Constructor

new Extensions()

Members

length

Methods

Symbols.serialize() → (non-null) {Object}

Returns:

A serialized representation of this Extensions object.

Type: 
Object

add(…args)

Add additional extensions to install when launching the browser. Each extension should be specified as the path to the packed CRX file, or a Buffer for an extension.

Parameters:
NameTypeAttributesDescription
argsstring | Buffer | !Array.<(string|!Buffer)><repeatable>

The extensions to add.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_chromium-Options.html b/docs/api/javascript/module-selenium-webdriver_chromium-Options.html index 38f65f3eec53d..fa704f7226ba6 100644 --- a/docs/api/javascript/module-selenium-webdriver_chromium-Options.html +++ b/docs/api/javascript/module-selenium-webdriver_chromium-Options.html @@ -1,6 +1,6 @@ Class: Options
On this page

selenium-webdriver/chromium~ Options

Class for managing WebDriver options specific to a Chromium-based browser.

Constructor

new Options(otheropt)

Parameters:
NameTypeAttributesDescription
otherCapabilities | Map.<string, ?> | Object<optional>

Another set of capabilities to initialize this instance from.

Methods

addArguments(…args) → (non-null) {Options}

Add additional command line arguments to use when launching the browser. Each argument may be specified with or without the "--" prefix (e.g. "--foo" and "foo"). Arguments with an associated value should be delimited by an "=": "foo=bar".

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The arguments to add.

Returns:

A self reference.

Type: 
Options

addExtensions(…args) → (non-null) {Options}

Add additional extensions to install when launching the browser. Each extension should be specified as the path to the packed CRX file, or a Buffer for an extension.

Parameters:
NameTypeAttributesDescription
argsstring | Buffer | !Array.<(string|!Buffer)><repeatable>

The extensions to add.

Returns:

A self reference.

Type: 
Options

androidActivity(name) → (non-null) {Options}

Sets the name of the activity hosting a Chrome-based Android WebView. This option must be set to connect to an Android WebView

Parameters:
NameTypeDescription
namestring

The activity name.

Returns:

A self reference.

Type: 
Options

androidDeviceSerial(serial) → (non-null) {Options}

Sets the device serial number to connect to via ADB. If not specified, the WebDriver server will select an unused device at random. An error will be returned if all devices already have active sessions.

Parameters:
NameTypeDescription
serialstring

The device serial number to connect to.

Returns:

A self reference.

Type: 
Options

androidPackage(pkgnullable) → (non-null) {Options}

Sets the package name of the Chrome or WebView app.

Parameters:
NameTypeAttributesDescription
pkgstring<nullable>

The package to connect to, or null to disable Android and switch back to using desktop browser.

Returns:

A self reference.

Type: 
Options

androidProcess(processName) → (non-null) {Options}

Sets the process name of the Activity hosting the WebView (as given by ps). If not specified, the process name is assumed to be the same as #androidPackage.

Parameters:
NameTypeDescription
processNamestring

The main activity name.

Returns:

A self reference.

Type: 
Options

androidUseRunningApp(useRunning) → (non-null) {Options}

Sets whether to connect to an already-running instead of the specified app instead of launching the app with a clean data directory.

Parameters:
NameTypeDescription
useRunningboolean

Whether to connect to a running instance.

Returns:

A self reference.

Type: 
Options

debuggerAddress(address) → (non-null) {Options}

Sets the address of a Chromium remote debugging server to connect to. Address should be of the form "{hostname|IP address}:port" (e.g. "localhost:9222").

Parameters:
NameTypeDescription
addressstring

The address to connect to.

Returns:

A self reference.

Type: 
Options

detachDriver(detach) → (non-null) {Options}

Sets whether to leave the started browser process running if the controlling driver service is killed before webdriver.WebDriver#quit() is called.

Parameters:
NameTypeDescription
detachboolean

Whether to leave the browser running if the driver service is killed before the session.

Returns:

A self reference.

Type: 
Options

enableBidi() → (non-null) {Capabilities}

Enable bidi connection

Returns:
Type: 
Capabilities

excludeSwitches(…args) → (non-null) {Options}

List of Chrome command line switches to exclude that ChromeDriver by default passes when starting Chrome. Do not prefix switches with "--".

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The switches to exclude.

Returns:

A self reference.

Type: 
Options

setBinaryPath(path) → (non-null) {Options}

Sets the path to the browser binary to use. On Mac OS X, this path should reference the actual Chromium executable, not just the application binary (e.g. "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome").

The binary path can be absolute or relative to the WebDriver server executable, but it must exist on the machine that will launch the browser.

Parameters:
NameTypeDescription
pathstring

The path to the browser binary to use.

Returns:

A self reference.

Type: 
Options

setBrowserLogFile(path) → (non-null) {Options}

Sets the path to the browser's log file. This path should exist on the machine that will launch the browser.

Parameters:
NameTypeDescription
pathstring

Path to the log file to use.

Returns:

A self reference.

Type: 
Options

setBrowserMinidumpPath(path) → (non-null) {Options}

Sets the directory to store browser minidumps in. This option is only supported when the driver is running on Linux.

Parameters:
NameTypeDescription
pathstring

The directory path.

Returns:

A self reference.

Type: 
Options

setLocalState(statenon-null) → (non-null) {Options}

Sets preferences for the "Local State" file in Chrome's user data directory.

Parameters:
NameTypeDescription
stateObject

Dictionary of local state preferences.

Returns:

A self reference.

Type: 
Options

setMobileEmulation(confignullable) → (non-null) {Options}

Configures the browser to emulate a mobile device. For more information, refer to the ChromeDriver project page on mobile emulation. Configuration options include:

  • deviceName: The name of a pre-configured emulated device
  • width: screen width, in pixels
  • height: screen height, in pixels
  • pixelRatio: screen pixel ratio

Example 1: Using a Pre-configured Device

let options = new chrome.Options().setMobileEmulation(
+    
On this page

selenium-webdriver/chromium~ Options

Class for managing WebDriver options specific to a Chromium-based browser.

Constructor

new Options(otheropt)

Parameters:
NameTypeAttributesDescription
otherCapabilities | Map.<string, ?> | Object<optional>

Another set of capabilities to initialize this instance from.

Methods

addArguments(…args) → (non-null) {Options}

Add additional command line arguments to use when launching the browser. Each argument may be specified with or without the "--" prefix (e.g. "--foo" and "foo"). Arguments with an associated value should be delimited by an "=": "foo=bar".

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The arguments to add.

Returns:

A self reference.

Type: 
Options

addExtensions(…args) → (non-null) {Options}

Add additional extensions to install when launching the browser. Each extension should be specified as the path to the packed CRX file, or a Buffer for an extension.

Parameters:
NameTypeAttributesDescription
argsstring | Buffer | !Array.<(string|!Buffer)><repeatable>

The extensions to add.

Returns:

A self reference.

Type: 
Options

androidActivity(name) → (non-null) {Options}

Sets the name of the activity hosting a Chrome-based Android WebView. This option must be set to connect to an Android WebView

Parameters:
NameTypeDescription
namestring

The activity name.

Returns:

A self reference.

Type: 
Options

androidDeviceSerial(serial) → (non-null) {Options}

Sets the device serial number to connect to via ADB. If not specified, the WebDriver server will select an unused device at random. An error will be returned if all devices already have active sessions.

Parameters:
NameTypeDescription
serialstring

The device serial number to connect to.

Returns:

A self reference.

Type: 
Options

androidPackage(pkgnullable) → (non-null) {Options}

Sets the package name of the Chrome or WebView app.

Parameters:
NameTypeAttributesDescription
pkgstring<nullable>

The package to connect to, or null to disable Android and switch back to using desktop browser.

Returns:

A self reference.

Type: 
Options

androidProcess(processName) → (non-null) {Options}

Sets the process name of the Activity hosting the WebView (as given by ps). If not specified, the process name is assumed to be the same as #androidPackage.

Parameters:
NameTypeDescription
processNamestring

The main activity name.

Returns:

A self reference.

Type: 
Options

androidUseRunningApp(useRunning) → (non-null) {Options}

Sets whether to connect to an already-running instead of the specified app instead of launching the app with a clean data directory.

Parameters:
NameTypeDescription
useRunningboolean

Whether to connect to a running instance.

Returns:

A self reference.

Type: 
Options

debuggerAddress(address) → (non-null) {Options}

Sets the address of a Chromium remote debugging server to connect to. Address should be of the form "{hostname|IP address}:port" (e.g. "localhost:9222").

Parameters:
NameTypeDescription
addressstring

The address to connect to.

Returns:

A self reference.

Type: 
Options

detachDriver(detach) → (non-null) {Options}

Sets whether to leave the started browser process running if the controlling driver service is killed before webdriver.WebDriver#quit() is called.

Parameters:
NameTypeDescription
detachboolean

Whether to leave the browser running if the driver service is killed before the session.

Returns:

A self reference.

Type: 
Options

enableBidi() → (non-null) {Capabilities}

Enable bidi connection

Returns:
Type: 
Capabilities

excludeSwitches(…args) → (non-null) {Options}

List of Chrome command line switches to exclude that ChromeDriver by default passes when starting Chrome. Do not prefix switches with "--".

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The switches to exclude.

Returns:

A self reference.

Type: 
Options

setBinaryPath(path) → (non-null) {Options}

Sets the path to the browser binary to use. On Mac OS X, this path should reference the actual Chromium executable, not just the application binary (e.g. "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome").

The binary path can be absolute or relative to the WebDriver server executable, but it must exist on the machine that will launch the browser.

Parameters:
NameTypeDescription
pathstring

The path to the browser binary to use.

Returns:

A self reference.

Type: 
Options

setBrowserLogFile(path) → (non-null) {Options}

Sets the path to the browser's log file. This path should exist on the machine that will launch the browser.

Parameters:
NameTypeDescription
pathstring

Path to the log file to use.

Returns:

A self reference.

Type: 
Options

setBrowserMinidumpPath(path) → (non-null) {Options}

Sets the directory to store browser minidumps in. This option is only supported when the driver is running on Linux.

Parameters:
NameTypeDescription
pathstring

The directory path.

Returns:

A self reference.

Type: 
Options

setLocalState(statenon-null) → (non-null) {Options}

Sets preferences for the "Local State" file in Chrome's user data directory.

Parameters:
NameTypeDescription
stateObject

Dictionary of local state preferences.

Returns:

A self reference.

Type: 
Options

setMobileEmulation(confignullable) → (non-null) {Options}

Configures the browser to emulate a mobile device. For more information, refer to the ChromeDriver project page on mobile emulation. Configuration options include:

  • deviceName: The name of a pre-configured emulated device
  • width: screen width, in pixels
  • height: screen height, in pixels
  • pixelRatio: screen pixel ratio

Example 1: Using a Pre-configured Device

let options = new chrome.Options().setMobileEmulation(
     {deviceName: 'Google Nexus 5'});
 
 let driver = chrome.Driver.createSession(options);
@@ -11,4 +11,4 @@
 }});
 
 let driver = chrome.Driver.createSession(options);
-
Parameters:
NameTypeAttributesDescription
configObject | Object<nullable>

The mobile emulation configuration, or null to disable emulation.

Returns:

A self reference.

Type: 
Options

setPerfLoggingPrefs(prefs) → (non-null) {Options}

Sets the performance logging preferences. Options include:

  • enableNetwork: Whether or not to collect events from Network domain.
  • enablePage: Whether or not to collect events from Page domain.
  • enableTimeline: Whether or not to collect events from Timeline domain. Note: when tracing is enabled, Timeline domain is implicitly disabled, unless enableTimeline is explicitly set to true.
  • traceCategories: A comma-separated string of Chromium tracing categories for which trace events should be collected. An unspecified or empty string disables tracing.
  • bufferUsageReportingInterval: The requested number of milliseconds between DevTools trace buffer usage events. For example, if 1000, then once per second, DevTools will report how full the trace buffer is. If a report indicates the buffer usage is 100%, a warning will be issued.
Parameters:
NameTypeDescription
prefsObject

The performance logging preferences.

Returns:

A self reference.

Type: 
Options

setUserPreferences(prefsnon-null) → (non-null) {Options}

Sets the user preferences for Chrome's user profile. See the "Preferences" file in Chrome's user data directory for examples.

Parameters:
NameTypeDescription
prefsObject

Dictionary of user preferences to use.

Returns:

A self reference.

Type: 
Options

windowSize(size) → (non-null) {Options}

Sets the initial window size.

Parameters:
NameTypeDescription
sizeObject

The desired window size.

Throws:

if width or height is unspecified, not a number, or less than or equal to 0.

Type
TypeError
Returns:

A self reference.

Type: 
Options

windowTypes(…args) → (non-null) {Options}

Sets a list of the window types that will appear when getting window handles. For access toelements, include "webview" in the list.

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The window types that will appear when getting window handles.

Returns:

A self reference.

Type: 
Options
Selenium WebDriver JavaScript API
\ No newline at end of file +
Parameters:
NameTypeAttributesDescription
configObject | Object<nullable>

The mobile emulation configuration, or null to disable emulation.

Returns:

A self reference.

Type: 
Options

setPerfLoggingPrefs(prefs) → (non-null) {Options}

Sets the performance logging preferences. Options include:

  • enableNetwork: Whether or not to collect events from Network domain.
  • enablePage: Whether or not to collect events from Page domain.
  • enableTimeline: Whether or not to collect events from Timeline domain. Note: when tracing is enabled, Timeline domain is implicitly disabled, unless enableTimeline is explicitly set to true.
  • traceCategories: A comma-separated string of Chromium tracing categories for which trace events should be collected. An unspecified or empty string disables tracing.
  • bufferUsageReportingInterval: The requested number of milliseconds between DevTools trace buffer usage events. For example, if 1000, then once per second, DevTools will report how full the trace buffer is. If a report indicates the buffer usage is 100%, a warning will be issued.
Parameters:
NameTypeDescription
prefsObject

The performance logging preferences.

Returns:

A self reference.

Type: 
Options

setUserPreferences(prefsnon-null) → (non-null) {Options}

Sets the user preferences for Chrome's user profile. See the "Preferences" file in Chrome's user data directory for examples.

Parameters:
NameTypeDescription
prefsObject

Dictionary of user preferences to use.

Returns:

A self reference.

Type: 
Options

windowSize(size) → (non-null) {Options}

Sets the initial window size.

Parameters:
NameTypeDescription
sizeObject

The desired window size.

Throws:

if width or height is unspecified, not a number, or less than or equal to 0.

Type
TypeError
Returns:

A self reference.

Type: 
Options

windowTypes(…args) → (non-null) {Options}

Sets a list of the window types that will appear when getting window handles. For access toelements, include "webview" in the list.

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The window types that will appear when getting window handles.

Returns:

A self reference.

Type: 
Options
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_chromium-ServiceBuilder.html b/docs/api/javascript/module-selenium-webdriver_chromium-ServiceBuilder.html index 3b675007ab41f..db8729712827d 100644 --- a/docs/api/javascript/module-selenium-webdriver_chromium-ServiceBuilder.html +++ b/docs/api/javascript/module-selenium-webdriver_chromium-ServiceBuilder.html @@ -1,3 +1,3 @@ Class: ServiceBuilder
On this page

selenium-webdriver/chromium~ ServiceBuilder

Creates selenium-webdriver/remote.DriverService instances that manage a WebDriver server in a child process.

Constructor

new ServiceBuilder(exeopt)

Parameters:
NameTypeAttributesDescription
exestring<optional>

Path to the server executable to use. Subclasses should ensure a valid path to the appropriate exe is provided.

Methods

enableChromeLogging() → (non-null) {ServiceBuilder}

Enables Chrome logging.

Returns:

A self reference.

Type: 
ServiceBuilder

enableVerboseLogging() → (non-null) {ServiceBuilder}

Enables verbose logging.

Returns:

A self reference.

Type: 
ServiceBuilder

loggingTo(path) → (non-null) {ServiceBuilder}

Sets the path of the log file the driver should log to. If a log file is not specified, the driver will log to stderr.

Parameters:
NameTypeDescription
pathstring

Path of the log file to use.

Returns:

A self reference.

Type: 
ServiceBuilder

setAdbPort(port) → (non-null) {ServiceBuilder}

Sets which port adb is listening to. The driver will connect to adb if an Android session is requested, but adb must be started beforehand.

Parameters:
NameTypeDescription
portnumber

Which port adb is running on.

Returns:

A self reference.

Type: 
ServiceBuilder

setNumHttpThreads(n) → (non-null) {ServiceBuilder}

Sets the number of threads the driver should use to manage HTTP requests. By default, the driver will use 4 threads.

Parameters:
NameTypeDescription
nnumber

The number of threads to use.

Returns:

A self reference.

Type: 
ServiceBuilder

setPath()

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/chromium~ ServiceBuilder

Creates selenium-webdriver/remote.DriverService instances that manage a WebDriver server in a child process.

Constructor

new ServiceBuilder(exeopt)

Parameters:
NameTypeAttributesDescription
exestring<optional>

Path to the server executable to use. Subclasses should ensure a valid path to the appropriate exe is provided.

Methods

enableChromeLogging() → (non-null) {ServiceBuilder}

Enables Chrome logging.

Returns:

A self reference.

Type: 
ServiceBuilder

enableVerboseLogging() → (non-null) {ServiceBuilder}

Enables verbose logging.

Returns:

A self reference.

Type: 
ServiceBuilder

loggingTo(path) → (non-null) {ServiceBuilder}

Sets the path of the log file the driver should log to. If a log file is not specified, the driver will log to stderr.

Parameters:
NameTypeDescription
pathstring

Path of the log file to use.

Returns:

A self reference.

Type: 
ServiceBuilder

setAdbPort(port) → (non-null) {ServiceBuilder}

Sets which port adb is listening to. The driver will connect to adb if an Android session is requested, but adb must be started beforehand.

Parameters:
NameTypeDescription
portnumber

Which port adb is running on.

Returns:

A self reference.

Type: 
ServiceBuilder

setNumHttpThreads(n) → (non-null) {ServiceBuilder}

Sets the number of threads the driver should use to manage HTTP requests. By default, the driver will use 4 threads.

Parameters:
NameTypeDescription
nnumber

The number of threads to use.

Returns:

A self reference.

Type: 
ServiceBuilder

setPath()

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_chromium.html b/docs/api/javascript/module-selenium-webdriver_chromium.html index 4abd18c9bff6a..34508d7531ff2 100644 --- a/docs/api/javascript/module-selenium-webdriver_chromium.html +++ b/docs/api/javascript/module-selenium-webdriver_chromium.html @@ -1,6 +1,6 @@ Module: selenium-webdriver/chromium
On this page

selenium-webdriver/chromium

Defines an abstract WebDriver client for Chromium-based web browsers. These classes should not be instantiated directly.

There are three primary classes exported by this module:

  1. ServiceBuilder: configures the remote.DriverService that manages a WebDriver server child process.

  2. Options: defines configuration options for each new Chromium session, such as which proxy to use, what extensions to install, or what command-line switches to use when starting the browser.

  3. Driver: the WebDriver client; each new instance will control a unique browser session with a clean user profile (unless otherwise configured through the Options class).

    let chrome = require('selenium-webdriver/chrome'); let {Builder} = require('selenium-webdriver');

    let driver = new Builder() .forBrowser('chrome') .setChromeOptions(new chrome.Options()) .build();

Customizing the Chromium WebDriver Server

Subclasses of Driver are expected to provide a static getDefaultService method. By default, this method will be called every time a Driver instance is created to obtain the default driver service for that specific browser (e.g. Chrome or Chromium Edge). Subclasses are responsible for managing the lifetime of the default service.

You may also create a Driver with its own driver service. This is useful if you need to capture the server's log output for a specific session:

let chrome = require('selenium-webdriver/chrome');
+    
On this page

selenium-webdriver/chromium

Defines an abstract WebDriver client for Chromium-based web browsers. These classes should not be instantiated directly.

There are three primary classes exported by this module:

  1. ServiceBuilder: configures the remote.DriverService that manages a WebDriver server child process.

  2. Options: defines configuration options for each new Chromium session, such as which proxy to use, what extensions to install, or what command-line switches to use when starting the browser.

  3. Driver: the WebDriver client; each new instance will control a unique browser session with a clean user profile (unless otherwise configured through the Options class).

    let chrome = require('selenium-webdriver/chrome'); let {Builder} = require('selenium-webdriver');

    let driver = new Builder() .forBrowser('chrome') .setChromeOptions(new chrome.Options()) .build();

Customizing the Chromium WebDriver Server

Subclasses of Driver are expected to provide a static getDefaultService method. By default, this method will be called every time a Driver instance is created to obtain the default driver service for that specific browser (e.g. Chrome or Chromium Edge). Subclasses are responsible for managing the lifetime of the default service.

You may also create a Driver with its own driver service. This is useful if you need to capture the server's log output for a specific session:

let chrome = require('selenium-webdriver/chrome');
 
 let service = new chrome.ServiceBuilder()
     .loggingTo('/my/log/file.txt')
@@ -11,4 +11,4 @@
 // configure browser options ...
 
 let driver = chrome.Driver.createSession(options, service);
-

Classes

Driver
Extensions
Options
ServiceBuilder

Members

(inner, constant) Command :string

Custom command names supported by Chromium WebDriver.

Type:
  • string
Properties
NameTypeDescription
LAUNCH_APPstring
GET_NETWORK_CONDITIONSstring
SET_NETWORK_CONDITIONSstring
DELETE_NETWORK_CONDITIONSstring
SEND_DEVTOOLS_COMMANDstring
SEND_AND_GET_DEVTOOLS_COMMANDstring
SET_PERMISSIONstring
GET_CAST_SINKSstring
SET_CAST_SINK_TO_USEstring
START_CAST_DESKTOP_MIRRORINGstring
START_CAST_TAB_MIRRORINGstring
GET_CAST_ISSUE_MESSAGEstring
STOP_CASTINGstring

Methods

(inner) configureExecutor(executornon-null)

Configures the given executor with Chromium-specific commands.

Parameters:
NameTypeDescription
executorhttp.Executor

the executor to configure.

(inner) createExecutor(urlnon-null, vendorPrefix) → (non-null) {command.Executor}

Creates a command executor with support for Chromium's custom commands.

Parameters:
NameTypeDescription
urlPromise.<string>

The server's URL.

vendorPrefix
Returns:

The new command executor.

Type: 
command.Executor
Selenium WebDriver JavaScript API
\ No newline at end of file +

Classes

Driver
Extensions
Options
ServiceBuilder

Members

(inner, constant) Command :string

Custom command names supported by Chromium WebDriver.

Type:
  • string
Properties
NameTypeDescription
LAUNCH_APPstring
GET_NETWORK_CONDITIONSstring
SET_NETWORK_CONDITIONSstring
DELETE_NETWORK_CONDITIONSstring
SEND_DEVTOOLS_COMMANDstring
SEND_AND_GET_DEVTOOLS_COMMANDstring
SET_PERMISSIONstring
GET_CAST_SINKSstring
SET_CAST_SINK_TO_USEstring
START_CAST_DESKTOP_MIRRORINGstring
START_CAST_TAB_MIRRORINGstring
GET_CAST_ISSUE_MESSAGEstring
STOP_CASTINGstring

Methods

(inner) configureExecutor(executornon-null)

Configures the given executor with Chromium-specific commands.

Parameters:
NameTypeDescription
executorhttp.Executor

the executor to configure.

(inner) createExecutor(urlnon-null, vendorPrefix) → (non-null) {command.Executor}

Creates a command executor with support for Chromium's custom commands.

Parameters:
NameTypeDescription
urlPromise.<string>

The server's URL.

vendorPrefix
Returns:

The new command executor.

Type: 
command.Executor
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_edge-Driver.html b/docs/api/javascript/module-selenium-webdriver_edge-Driver.html index 42373e0ed36e3..77c6cda502dd1 100644 --- a/docs/api/javascript/module-selenium-webdriver_edge-Driver.html +++ b/docs/api/javascript/module-selenium-webdriver_edge-Driver.html @@ -1,3 +1,3 @@ Class: Driver
On this page

selenium-webdriver/edge~ Driver

Creates a new WebDriver client for Microsoft's Edge.

Constructor

new Driver()

Methods

setFileDetector()

This function is a no-op as file detectors are not supported by this implementation.

(static) createSession(opt_configopt, opt_serviceExecutoropt) → (non-null) {Driver}

Creates a new browser session for Microsoft's Edge browser.

Parameters:
NameTypeAttributesDescription
opt_configCapabilities | Options<optional>

The configuration options.

opt_serviceExecutorremote.DriverService<optional>

The service to use; will create a new Legacy or Chromium service based on Options by default.

Returns:

A new driver instance.

Type: 
Driver

(static) getDefaultService() → {remote.DriverService}

returns new instance of edge driver service

Returns:
Type: 
remote.DriverService
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/edge~ Driver

Creates a new WebDriver client for Microsoft's Edge.

Constructor

new Driver()

Methods

setFileDetector()

This function is a no-op as file detectors are not supported by this implementation.

(static) createSession(opt_configopt, opt_serviceExecutoropt) → (non-null) {Driver}

Creates a new browser session for Microsoft's Edge browser.

Parameters:
NameTypeAttributesDescription
opt_configCapabilities | Options<optional>

The configuration options.

opt_serviceExecutorremote.DriverService<optional>

The service to use; will create a new Legacy or Chromium service based on Options by default.

Returns:

A new driver instance.

Type: 
Driver

(static) getDefaultService() → {remote.DriverService}

returns new instance of edge driver service

Returns:
Type: 
remote.DriverService
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_edge-Options.html b/docs/api/javascript/module-selenium-webdriver_edge-Options.html index 9e3523b7e4e7c..e925948124fee 100644 --- a/docs/api/javascript/module-selenium-webdriver_edge-Options.html +++ b/docs/api/javascript/module-selenium-webdriver_edge-Options.html @@ -1,3 +1,3 @@ Class: Options
On this page

selenium-webdriver/edge~ Options

Class for managing edge chromium specific options.

Constructor

new Options()

Methods

setEdgeChromiumBinaryPath(path) → (non-null) {Options}

Sets the path to the edge binary to use

The binary path be absolute or relative to the msedgedriver server executable, but it must exist on the machine that will launch edge chromium.

Parameters:
NameTypeDescription
pathstring

The path to the msedgedriver binary to use.

Returns:

A self reference.

Type: 
Options

useWebView(enable)

Changes the browser name to 'webview2' to enable test automation of WebView2 apps with Microsoft Edge WebDriver

Parameters:
NameTypeDescription
enableboolean

flag to enable or disable the 'webview2' usage

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/edge~ Options

Class for managing edge chromium specific options.

Constructor

new Options()

Methods

setEdgeChromiumBinaryPath(path) → (non-null) {Options}

Sets the path to the edge binary to use

The binary path be absolute or relative to the msedgedriver server executable, but it must exist on the machine that will launch edge chromium.

Parameters:
NameTypeDescription
pathstring

The path to the msedgedriver binary to use.

Returns:

A self reference.

Type: 
Options

useWebView(enable)

Changes the browser name to 'webview2' to enable test automation of WebView2 apps with Microsoft Edge WebDriver

Parameters:
NameTypeDescription
enableboolean

flag to enable or disable the 'webview2' usage

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_edge-ServiceBuilder.html b/docs/api/javascript/module-selenium-webdriver_edge-ServiceBuilder.html index 6661aed65be08..bb182d0f38da4 100644 --- a/docs/api/javascript/module-selenium-webdriver_edge-ServiceBuilder.html +++ b/docs/api/javascript/module-selenium-webdriver_edge-ServiceBuilder.html @@ -1,3 +1,3 @@ Class: ServiceBuilder
On this page

selenium-webdriver/edge~ ServiceBuilder

Creates selenium-webdriver/remote.DriverService instances that manage a MSEdgeDriver server in a child process.

Constructor

new ServiceBuilder(opt_exeopt)

Parameters:
NameTypeAttributesDescription
opt_exestring<optional>

Path to the server executable to use. If omitted, the builder will attempt to locate the msedgedriver on the current PATH.

Throws:

If provided executable does not exist, or the msedgedriver cannot be found on the PATH.

Type
Error
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/edge~ ServiceBuilder

Creates selenium-webdriver/remote.DriverService instances that manage a MSEdgeDriver server in a child process.

Constructor

new ServiceBuilder(opt_exeopt)

Parameters:
NameTypeAttributesDescription
opt_exestring<optional>

Path to the server executable to use. If omitted, the builder will attempt to locate the msedgedriver on the current PATH.

Throws:

If provided executable does not exist, or the msedgedriver cannot be found on the PATH.

Type
Error
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_edge.html b/docs/api/javascript/module-selenium-webdriver_edge.html index 7e15ee9a08819..ac633416915fc 100644 --- a/docs/api/javascript/module-selenium-webdriver_edge.html +++ b/docs/api/javascript/module-selenium-webdriver_edge.html @@ -1,6 +1,6 @@ Module: selenium-webdriver/edge
On this page

selenium-webdriver/edge

Defines a WebDriver client for Microsoft's Edge web browser. Edge (Chromium) is supported and support for Edge Legacy (EdgeHTML) as part of https://github.com/SeleniumHQ/selenium/issues/9166. Before using this module, you must download and install the correct WebDriver server.

Ensure that the msedgedriver (Chromium) is on your PATH.

You may use Options to specify whether Edge Chromium options should be used: const edge = require('selenium-webdriver/edge'); const options = new edge.Options(); There are three primary classes exported by this module:

  1. ServiceBuilder: configures the remote.DriverService that manages the [WebDriver] child process.

  2. Options: defines configuration options for each new WebDriver session, such as which proxy to use when starting the browser.

  3. Driver: the WebDriver client; each new instance will control a unique browser session.

Customizing the WebDriver Server

By default, every MicrosoftEdge session will use a single driver service, which is started the first time a Driver instance is created and terminated when this process exits. The default service will inherit its environment from the current process. You may obtain a handle to this default service using getDefaultService() and change its configuration with setDefaultService().

You may also create a Driver with its own driver service. This is useful if you need to capture the server's log output for a specific session:

const edge = require('selenium-webdriver/edge');
+    
On this page

selenium-webdriver/edge

Defines a WebDriver client for Microsoft's Edge web browser. Edge (Chromium) is supported and support for Edge Legacy (EdgeHTML) as part of https://github.com/SeleniumHQ/selenium/issues/9166. Before using this module, you must download and install the correct WebDriver server.

Ensure that the msedgedriver (Chromium) is on your PATH.

You may use Options to specify whether Edge Chromium options should be used: const edge = require('selenium-webdriver/edge'); const options = new edge.Options(); There are three primary classes exported by this module:

  1. ServiceBuilder: configures the remote.DriverService that manages the [WebDriver] child process.

  2. Options: defines configuration options for each new WebDriver session, such as which proxy to use when starting the browser.

  3. Driver: the WebDriver client; each new instance will control a unique browser session.

Customizing the WebDriver Server

By default, every MicrosoftEdge session will use a single driver service, which is started the first time a Driver instance is created and terminated when this process exits. The default service will inherit its environment from the current process. You may obtain a handle to this default service using getDefaultService() and change its configuration with setDefaultService().

You may also create a Driver with its own driver service. This is useful if you need to capture the server's log output for a specific session:

const edge = require('selenium-webdriver/edge');
 
 const service = new edge.ServiceBuilder()
     .setPort(55555)
@@ -10,4 +10,4 @@
 // configure browser options ...
 
 let driver = edge.Driver.createSession(options, service);
-

Users should only instantiate the Driver class directly when they need a custom driver service configuration (as shown above). For normal operation, users should start msedgedriver using the selenium-webdriver.Builder.

Classes

Driver
Options
ServiceBuilder
Selenium WebDriver JavaScript API
\ No newline at end of file +

Users should only instantiate the Driver class directly when they need a custom driver service configuration (as shown above). For normal operation, users should start msedgedriver using the selenium-webdriver.Builder.

Classes

Driver
Options
ServiceBuilder
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_firefox-AddonFormatError.html b/docs/api/javascript/module-selenium-webdriver_firefox-AddonFormatError.html index 1b824c5567d5b..5f40428e06b1c 100644 --- a/docs/api/javascript/module-selenium-webdriver_firefox-AddonFormatError.html +++ b/docs/api/javascript/module-selenium-webdriver_firefox-AddonFormatError.html @@ -1,3 +1,3 @@ Class: AddonFormatError
On this page

selenium-webdriver/firefox~ AddonFormatError

Thrown when there an add-on is malformed.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/firefox~ AddonFormatError

Thrown when there an add-on is malformed.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_firefox-Channel.html b/docs/api/javascript/module-selenium-webdriver_firefox-Channel.html index 97a38e0fab0f8..8db70505834bb 100644 --- a/docs/api/javascript/module-selenium-webdriver_firefox-Channel.html +++ b/docs/api/javascript/module-selenium-webdriver_firefox-Channel.html @@ -1,3 +1,3 @@ Class: Channel
On this page

selenium-webdriver/firefox~ Channel

Provides methods for locating the executable for a Firefox release channel on Windows and MacOS. For other systems (i.e. Linux), Firefox will always be located on the system PATH.

Constructor

new Channel(darwin, win32)

Parameters:
NameTypeDescription
darwinstring

The path to check when running on MacOS.

win32string

The path to check when running on Windows.

Deprecated
  • Instead of using this class, you should configure the Options with the appropriate binary location or let Selenium Manager handle it for you.

Members

(static, constant) BETA

Firefox's beta channel. Note this is provided mainly for convenience as the beta channel has the same installation location as the main release channel.

(static, constant) DEV

Firefox's developer channel.

(static, constant) NIGHTLY

Firefox's nightly release channel.

(static, constant) RELEASE

Firefox's release channel.

Methods

Symbols.serialize() → (non-null) {Promise.<string>}

Returns:
Type: 
Promise.<string>

locate() → (non-null) {Promise.<string>}

Attempts to locate the Firefox executable for this release channel. This will first check the default installation location for the channel before checking the user's PATH. The returned promise will be rejected if Firefox can not be found.

Returns:

A promise for the location of the located Firefox executable.

Type: 
Promise.<string>
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/firefox~ Channel

Provides methods for locating the executable for a Firefox release channel on Windows and MacOS. For other systems (i.e. Linux), Firefox will always be located on the system PATH.

Constructor

new Channel(darwin, win32)

Parameters:
NameTypeDescription
darwinstring

The path to check when running on MacOS.

win32string

The path to check when running on Windows.

Deprecated
  • Instead of using this class, you should configure the Options with the appropriate binary location or let Selenium Manager handle it for you.

Members

(static, constant) BETA

Firefox's beta channel. Note this is provided mainly for convenience as the beta channel has the same installation location as the main release channel.

(static, constant) DEV

Firefox's developer channel.

(static, constant) NIGHTLY

Firefox's nightly release channel.

(static, constant) RELEASE

Firefox's release channel.

Methods

Symbols.serialize() → (non-null) {Promise.<string>}

Returns:
Type: 
Promise.<string>

locate() → (non-null) {Promise.<string>}

Attempts to locate the Firefox executable for this release channel. This will first check the default installation location for the channel before checking the user's PATH. The returned promise will be rejected if Firefox can not be found.

Returns:

A promise for the location of the located Firefox executable.

Type: 
Promise.<string>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_firefox-Driver.html b/docs/api/javascript/module-selenium-webdriver_firefox-Driver.html index 30208d60982c3..3a980c008ba3e 100644 --- a/docs/api/javascript/module-selenium-webdriver_firefox-Driver.html +++ b/docs/api/javascript/module-selenium-webdriver_firefox-Driver.html @@ -1,3 +1,3 @@ Class: Driver
On this page

selenium-webdriver/firefox~ Driver

A WebDriver client for Firefox.

Constructor

new Driver()

Methods

getContext() → (non-null) {Promise.<Context>}

Get the context that is currently in effect.

Returns:

Current context.

Type: 
Promise.<Context>

(async) installAddon(path, temporary) → (non-null) {Promise.<string>}

Installs a new addon with the current session. This function will return an ID that may later be used to uninstall the addon.

Parameters:
NameTypeDefaultDescription
pathstring

Path on the local filesystem to the web extension to install.

temporarybooleanfalse

Flag indicating whether the extension should be installed temporarily - gets removed on restart

Returns:

A promise that will resolve to an ID for the newly installed addon.

Type: 
Promise.<string>

setContext(ctxnon-null)

Changes target context for commands between chrome- and content.

Changing the current context has a stateful impact on all subsequent commands. The Context.CONTENT context has normal web platform document permissions, as if you would evaluate arbitrary JavaScript. The Context.CHROME context gets elevated permissions that lets you manipulate the browser chrome itself, with full access to the XUL toolkit.

Use your powers wisely.

Parameters:
NameTypeDescription
ctxPromise.<void>

The context to switch to.

setFileDetector()

This function is a no-op as file detectors are not supported by this implementation.

takeFullPageScreenshot() → (non-null) {Promise.<string>}

Take full page screenshot of the visible region

Returns:

A promise that will be resolved to the screenshot as a base-64 encoded PNG.

Type: 
Promise.<string>

(async) uninstallAddon(id) → (non-null) {Promise}

Uninstalls an addon from the current browser session's profile.

Parameters:
NameTypeDescription
idstring | !Promise.<string>

ID of the addon to uninstall.

Returns:

A promise that will resolve when the operation has completed.

Type: 
Promise

(static) createSession(opt_configopt, opt_executoropt) → (non-null) {Driver}

Creates a new Firefox session.

Parameters:
NameTypeAttributesDescription
opt_configOptions | Capabilities | Object<optional>

The configuration options for this driver, specified as either an Options or Capabilities, or as a raw hash object.

opt_executorhttp.Executor | remote.DriverService<optional>

Either a pre-configured command executor to use for communicating with an externally managed remote end (which is assumed to already be running), or the DriverService to use to start the geckodriver in a child process.

If an executor is provided, care should e taken not to use reuse it with other clients as its internal command mappings will be updated to support Firefox-specific commands.

This parameter may only be used with Mozilla's GeckoDriver.

Throws:

If a custom command executor is provided and the driver is configured to use the legacy FirefoxDriver from the Selenium project.

Type
Error
Returns:

A new driver instance.

Type: 
Driver
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/firefox~ Driver

A WebDriver client for Firefox.

Constructor

new Driver()

Methods

getContext() → (non-null) {Promise.<Context>}

Get the context that is currently in effect.

Returns:

Current context.

Type: 
Promise.<Context>

(async) installAddon(path, temporary) → (non-null) {Promise.<string>}

Installs a new addon with the current session. This function will return an ID that may later be used to uninstall the addon.

Parameters:
NameTypeDefaultDescription
pathstring

Path on the local filesystem to the web extension to install.

temporarybooleanfalse

Flag indicating whether the extension should be installed temporarily - gets removed on restart

Returns:

A promise that will resolve to an ID for the newly installed addon.

Type: 
Promise.<string>

setContext(ctxnon-null)

Changes target context for commands between chrome- and content.

Changing the current context has a stateful impact on all subsequent commands. The Context.CONTENT context has normal web platform document permissions, as if you would evaluate arbitrary JavaScript. The Context.CHROME context gets elevated permissions that lets you manipulate the browser chrome itself, with full access to the XUL toolkit.

Use your powers wisely.

Parameters:
NameTypeDescription
ctxPromise.<void>

The context to switch to.

setFileDetector()

This function is a no-op as file detectors are not supported by this implementation.

takeFullPageScreenshot() → (non-null) {Promise.<string>}

Take full page screenshot of the visible region

Returns:

A promise that will be resolved to the screenshot as a base-64 encoded PNG.

Type: 
Promise.<string>

(async) uninstallAddon(id) → (non-null) {Promise}

Uninstalls an addon from the current browser session's profile.

Parameters:
NameTypeDescription
idstring | !Promise.<string>

ID of the addon to uninstall.

Returns:

A promise that will resolve when the operation has completed.

Type: 
Promise

(static) createSession(opt_configopt, opt_executoropt) → (non-null) {Driver}

Creates a new Firefox session.

Parameters:
NameTypeAttributesDescription
opt_configOptions | Capabilities | Object<optional>

The configuration options for this driver, specified as either an Options or Capabilities, or as a raw hash object.

opt_executorhttp.Executor | remote.DriverService<optional>

Either a pre-configured command executor to use for communicating with an externally managed remote end (which is assumed to already be running), or the DriverService to use to start the geckodriver in a child process.

If an executor is provided, care should e taken not to use reuse it with other clients as its internal command mappings will be updated to support Firefox-specific commands.

This parameter may only be used with Mozilla's GeckoDriver.

Throws:

If a custom command executor is provided and the driver is configured to use the legacy FirefoxDriver from the Selenium project.

Type
Error
Returns:

A new driver instance.

Type: 
Driver
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_firefox-Options.html b/docs/api/javascript/module-selenium-webdriver_firefox-Options.html index aa2329c18caec..dfe96f9a2187e 100644 --- a/docs/api/javascript/module-selenium-webdriver_firefox-Options.html +++ b/docs/api/javascript/module-selenium-webdriver_firefox-Options.html @@ -1,3 +1,3 @@ Class: Options
On this page

selenium-webdriver/firefox~ Options

Configuration options for the FirefoxDriver.

Constructor

new Options(otheropt)

Parameters:
NameTypeAttributesDescription
otherCapabilities | Map.<string, ?> | Object<optional>

Another set of capabilities to initialize this instance from.

Methods

addArguments(…args) → (non-null) {Options}

Specify additional command line arguments that should be used when starting the Firefox browser.

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The arguments to include.

Returns:

A self reference.

Type: 
Options

addExtensions(…paths) → (non-null) {Options}

Add extensions that should be installed when starting Firefox.

Parameters:
NameTypeAttributesDescription
pathsstring<repeatable>

The paths to the extension XPI files to install.

Returns:

A self reference.

Type: 
Options

enableBidi() → (non-null) {Capabilities}

Enable bidi connection

Returns:
Type: 
Capabilities

enableDebugger()

Enables moz:debuggerAddress for firefox cdp

enableMobile(androidPackage) → (non-null) {Options}

Enables Mobile start up features

Parameters:
NameTypeDefaultDescription
androidPackagestringorg.mozilla.firefox

The package to use

Returns:

A self reference

Type: 
Options

setBinary(binary) → (non-null) {Options}

Sets the binary to use. The binary may be specified as the path to a Firefox executable.

Parameters:
NameTypeDescription
binarystring

The binary to use.

Throws:

If binary is an invalid type.

Type
TypeError
Returns:

A self reference.

Type: 
Options

setPreference(key, value) → (non-null) {Options}

Parameters:
NameTypeDescription
keystring

the preference key.

valuestring | number | boolean

the preference value.

Throws:

if either the key or value has an invalid type.

Type
TypeError
Returns:

A self reference.

Type: 
Options

setProfile(profile) → (non-null) {Options}

Sets the path to an existing profile to use as a template for new browser sessions. This profile will be copied for each new session - changes will not be applied to the profile itself.

Parameters:
NameTypeDescription
profilestring

The profile to use.

Throws:

if profile is not a string.

Type
TypeError
Returns:

A self reference.

Type: 
Options

windowSize(size) → (non-null) {Options}

Sets the initial window size

Parameters:
NameTypeDescription
sizeObject

The desired window size.

Throws:

if width or height is unspecified, not a number, or less than or equal to 0.

Type
TypeError
Returns:

A self reference.

Type: 
Options
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/firefox~ Options

Configuration options for the FirefoxDriver.

Constructor

new Options(otheropt)

Parameters:
NameTypeAttributesDescription
otherCapabilities | Map.<string, ?> | Object<optional>

Another set of capabilities to initialize this instance from.

Methods

addArguments(…args) → (non-null) {Options}

Specify additional command line arguments that should be used when starting the Firefox browser.

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The arguments to include.

Returns:

A self reference.

Type: 
Options

addExtensions(…paths) → (non-null) {Options}

Add extensions that should be installed when starting Firefox.

Parameters:
NameTypeAttributesDescription
pathsstring<repeatable>

The paths to the extension XPI files to install.

Returns:

A self reference.

Type: 
Options

enableBidi() → (non-null) {Capabilities}

Enable bidi connection

Returns:
Type: 
Capabilities

enableDebugger()

Enables moz:debuggerAddress for firefox cdp

enableMobile(androidPackage) → (non-null) {Options}

Enables Mobile start up features

Parameters:
NameTypeDefaultDescription
androidPackagestringorg.mozilla.firefox

The package to use

Returns:

A self reference

Type: 
Options

setBinary(binary) → (non-null) {Options}

Sets the binary to use. The binary may be specified as the path to a Firefox executable.

Parameters:
NameTypeDescription
binarystring

The binary to use.

Throws:

If binary is an invalid type.

Type
TypeError
Returns:

A self reference.

Type: 
Options

setPreference(key, value) → (non-null) {Options}

Parameters:
NameTypeDescription
keystring

the preference key.

valuestring | number | boolean

the preference value.

Throws:

if either the key or value has an invalid type.

Type
TypeError
Returns:

A self reference.

Type: 
Options

setProfile(profile) → (non-null) {Options}

Sets the path to an existing profile to use as a template for new browser sessions. This profile will be copied for each new session - changes will not be applied to the profile itself.

Parameters:
NameTypeDescription
profilestring

The profile to use.

Throws:

if profile is not a string.

Type
TypeError
Returns:

A self reference.

Type: 
Options

windowSize(size) → (non-null) {Options}

Sets the initial window size

Parameters:
NameTypeDescription
sizeObject

The desired window size.

Throws:

if width or height is unspecified, not a number, or less than or equal to 0.

Type
TypeError
Returns:

A self reference.

Type: 
Options
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_firefox-ServiceBuilder.html b/docs/api/javascript/module-selenium-webdriver_firefox-ServiceBuilder.html index f6890ba6759f9..85514c7ee48b3 100644 --- a/docs/api/javascript/module-selenium-webdriver_firefox-ServiceBuilder.html +++ b/docs/api/javascript/module-selenium-webdriver_firefox-ServiceBuilder.html @@ -1,3 +1,3 @@ Class: ServiceBuilder
On this page

selenium-webdriver/firefox~ ServiceBuilder

Creates selenium-webdriver/remote.DriverService instances that manage a geckodriver server in a child process.

Constructor

new ServiceBuilder(opt_exeopt)

Parameters:
NameTypeAttributesDescription
opt_exestring<optional>

Path to the server executable to use. If omitted, the builder will attempt to locate the geckodriver on the system PATH.

Methods

enableVerboseLogging(opt_traceopt) → (non-null) {ServiceBuilder}

Enables verbose logging.

Parameters:
NameTypeAttributesDescription
opt_traceboolean<optional>

Whether to enable trace-level logging. By default, only debug logging is enabled.

Returns:

A self reference.

Type: 
ServiceBuilder
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/firefox~ ServiceBuilder

Creates selenium-webdriver/remote.DriverService instances that manage a geckodriver server in a child process.

Constructor

new ServiceBuilder(opt_exeopt)

Parameters:
NameTypeAttributesDescription
opt_exestring<optional>

Path to the server executable to use. If omitted, the builder will attempt to locate the geckodriver on the system PATH.

Methods

enableVerboseLogging(opt_traceopt) → (non-null) {ServiceBuilder}

Enables verbose logging.

Parameters:
NameTypeAttributesDescription
opt_traceboolean<optional>

Whether to enable trace-level logging. By default, only debug logging is enabled.

Returns:

A self reference.

Type: 
ServiceBuilder
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_firefox.html b/docs/api/javascript/module-selenium-webdriver_firefox.html index a4bbe908e8e26..90e6cdde358dd 100644 --- a/docs/api/javascript/module-selenium-webdriver_firefox.html +++ b/docs/api/javascript/module-selenium-webdriver_firefox.html @@ -1,6 +1,6 @@ Module: selenium-webdriver/firefox
On this page

selenium-webdriver/firefox

Defines the WebDriver client for Firefox. Before using this module, you must download the latest geckodriver release and ensure it can be found on your system PATH.

Each FirefoxDriver instance will be created with an anonymous profile, ensuring browser historys do not share session data (cookies, history, cache, offline storage, etc.)

Customizing the Firefox Profile

The profile used for each WebDriver session may be configured using the Options class. For example, you may install an extension, like Firebug:

const {Builder} = require('selenium-webdriver');
+    
On this page

selenium-webdriver/firefox

Defines the WebDriver client for Firefox. Before using this module, you must download the latest geckodriver release and ensure it can be found on your system PATH.

Each FirefoxDriver instance will be created with an anonymous profile, ensuring browser historys do not share session data (cookies, history, cache, offline storage, etc.)

Customizing the Firefox Profile

The profile used for each WebDriver session may be configured using the Options class. For example, you may install an extension, like Firebug:

const {Builder} = require('selenium-webdriver');
 const firefox = require('selenium-webdriver/firefox');
 
 let options = new firefox.Options()
@@ -27,4 +27,4 @@
     .usingServer('http://127.0.0.1:4444/wd/hub')
     .setFirefoxOptions(options)
     .build();
-

Classes

AddonFormatError
Channel
Driver
Options
ServiceBuilder

Members

(inner, constant) Context :string

Enum of available command contexts.

Command contexts are specific to Marionette, and may be used with the #context= method. Contexts allow you to direct all subsequent commands to either "content" (default) or "chrome". The latter gives you elevated security permissions.

Type:
  • string
Properties
NameTypeDescription
CONTENTstring
CHROMEstring

(inner, constant) ExtensionCommand :string

Type:
  • string
Properties
NameTypeDescription
GET_CONTEXTstring
SET_CONTEXTstring
INSTALL_ADDONstring
UNINSTALL_ADDONstring
FULL_PAGE_SCREENSHOTstring

Methods

(async, inner) buildProfile(templatenullable, extensionsnon-null) → (non-null) {Promise.<string>}

Parameters:
NameTypeAttributesDescription
templatestring<nullable>

path to an existing profile to use as a template.

extensionsArray.<string>

paths to extensions to install in the new profile.

Returns:

a promise for the base64 encoded profile.

Type: 
Promise.<string>

(inner) configureExecutor(executornon-null)

Configures the given executor with Firefox-specific commands.

Parameters:
NameTypeDescription
executorhttp.Executor

the executor to configure.

(inner) createExecutor(serverUrlnon-null) → (non-null) {command.Executor}

Creates a command executor with support for Marionette's custom commands.

Parameters:
NameTypeDescription
serverUrlPromise.<string>

The server's URL.

Returns:

The new command executor.

Type: 
command.Executor

(inner) findInProgramFiles(file) → (non-null) {Promise.<?string>}

Parameters:
NameTypeDescription
filestring

Path to the file to find, relative to the program files root.

Returns:

A promise for the located executable. The promise will resolve to {@code null} if Firefox was not found.

Type: 
Promise.<?string>

(async, inner) installExtension(extension, dir) → (non-null) {Promise.<string>}

Installs an extension to the given directory.

Parameters:
NameTypeDescription
extensionstring

Path to the xpi extension file to install.

dirstring

Path to the directory to install the extension in.

Returns:

A promise for the add-on ID once installed.

Type: 
Promise.<string>
Selenium WebDriver JavaScript API
\ No newline at end of file +

Classes

AddonFormatError
Channel
Driver
Options
ServiceBuilder

Members

(inner, constant) Context :string

Enum of available command contexts.

Command contexts are specific to Marionette, and may be used with the #context= method. Contexts allow you to direct all subsequent commands to either "content" (default) or "chrome". The latter gives you elevated security permissions.

Type:
  • string
Properties
NameTypeDescription
CONTENTstring
CHROMEstring

(inner, constant) ExtensionCommand :string

Type:
  • string
Properties
NameTypeDescription
GET_CONTEXTstring
SET_CONTEXTstring
INSTALL_ADDONstring
UNINSTALL_ADDONstring
FULL_PAGE_SCREENSHOTstring

Methods

(async, inner) buildProfile(templatenullable, extensionsnon-null) → (non-null) {Promise.<string>}

Parameters:
NameTypeAttributesDescription
templatestring<nullable>

path to an existing profile to use as a template.

extensionsArray.<string>

paths to extensions to install in the new profile.

Returns:

a promise for the base64 encoded profile.

Type: 
Promise.<string>

(inner) configureExecutor(executornon-null)

Configures the given executor with Firefox-specific commands.

Parameters:
NameTypeDescription
executorhttp.Executor

the executor to configure.

(inner) createExecutor(serverUrlnon-null) → (non-null) {command.Executor}

Creates a command executor with support for Marionette's custom commands.

Parameters:
NameTypeDescription
serverUrlPromise.<string>

The server's URL.

Returns:

The new command executor.

Type: 
command.Executor

(inner) findInProgramFiles(file) → (non-null) {Promise.<?string>}

Parameters:
NameTypeDescription
filestring

Path to the file to find, relative to the program files root.

Returns:

A promise for the located executable. The promise will resolve to {@code null} if Firefox was not found.

Type: 
Promise.<?string>

(async, inner) installExtension(extension, dir) → (non-null) {Promise.<string>}

Installs an extension to the given directory.

Parameters:
NameTypeDescription
extensionstring

Path to the xpi extension file to install.

dirstring

Path to the directory to install the extension in.

Returns:

A promise for the add-on ID once installed.

Type: 
Promise.<string>
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_ie-Driver.html b/docs/api/javascript/module-selenium-webdriver_ie-Driver.html index 02e80e2658236..c528bf921f029 100644 --- a/docs/api/javascript/module-selenium-webdriver_ie-Driver.html +++ b/docs/api/javascript/module-selenium-webdriver_ie-Driver.html @@ -1,3 +1,3 @@ Class: Driver
On this page

selenium-webdriver/ie~ Driver

A WebDriver client for Microsoft's Internet Explorer.

Constructor

new Driver()

Methods

setFileDetector()

This function is a no-op as file detectors are not supported by this implementation.

(static) createSession(optionsopt, opt_serviceopt) → (non-null) {Driver}

Creates a new session for Microsoft's Internet Explorer.

Parameters:
NameTypeAttributesDescription
optionsCapabilities | Options<optional>

The configuration options.

opt_serviceremote.DriverService<optional>

The DriverService to use to start the IEDriverServer in a child process, optionally.

Returns:

A new driver instance.

Type: 
Driver
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/ie~ Driver

A WebDriver client for Microsoft's Internet Explorer.

Constructor

new Driver()

Methods

setFileDetector()

This function is a no-op as file detectors are not supported by this implementation.

(static) createSession(optionsopt, opt_serviceopt) → (non-null) {Driver}

Creates a new session for Microsoft's Internet Explorer.

Parameters:
NameTypeAttributesDescription
optionsCapabilities | Options<optional>

The configuration options.

opt_serviceremote.DriverService<optional>

The DriverService to use to start the IEDriverServer in a child process, optionally.

Returns:

A new driver instance.

Type: 
Driver
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_ie-Options.html b/docs/api/javascript/module-selenium-webdriver_ie-Options.html index b25468b4d4938..32a81c50593eb 100644 --- a/docs/api/javascript/module-selenium-webdriver_ie-Options.html +++ b/docs/api/javascript/module-selenium-webdriver_ie-Options.html @@ -1,3 +1,3 @@ Class: Options
On this page

selenium-webdriver/ie~ Options

Class for managing IEDriver specific options.

Constructor

new Options(otheropt)

Parameters:
NameTypeAttributesDescription
otherCapabilities | Map.<string, ?> | Object<optional>

Another set of capabilities to initialize this instance from.

Source

Methods

addArguments(…args) → (non-null) {Options}

Specifies command-line switches to use when launching Internet Explorer. This is only valid when used with #forceCreateProcessApi.

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The arguments to add.

Deprecated
  • Use #addBrowserCommandSwitches instead.
Returns:

A self reference.

Type: 
Options

addBrowserCommandSwitches(…args) → (non-null) {Options}

Specifies command-line switches to use when launching Internet Explorer. This is only valid when used with #forceCreateProcessApi.

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The arguments to add.

Returns:

A self reference.

Type: 
Options

browserAttachTimeout(timeout) → (non-null) {Options}

Configures the timeout, in milliseconds, that the driver will attempt to located and attach to a newly opened instance of Internet Explorer. The default is zero, which indicates waiting indefinitely.

Parameters:
NameTypeDescription
timeoutnumber

How long to wait for IE.

Returns:

A self reference.

Type: 
Options

enableElementCacheCleanup(enable) → (non-null) {Options}

Configures whether the driver should attempt to remove obsolete WebElements from its internal cache on page navigation (true by default). Disabling this option will cause the driver to run with a larger memory footprint.

Parameters:
NameTypeDescription
enableboolean

Whether to enable element reference cleanup.

Returns:

A self reference.

Type: 
Options

enablePersistentHover(enable) → (non-null) {Options}

Configures whether to enable persistent mouse hovering (true by default). Persistent hovering is achieved by continuously firing mouse over events at the last location the mouse cursor has been moved to.

Parameters:
NameTypeDescription
enableboolean

Whether to enable persistent hovering.

Returns:

A self reference.

Type: 
Options

ensureCleanSession(cleanSession) → (non-null) {Options}

Configures whether to clear the cache, cookies, history, and saved form data before starting the browser. Using this capability will clear session data for all running instances of Internet Explorer, including those started manually.

Parameters:
NameTypeDescription
cleanSessionboolean

Whether to clear all session data on startup.

Returns:

A self reference.

Type: 
Options

fileUploadDialogTimeout(timeout) → (non-null) {Options}

The options File Upload Dialog Timeout in milliseconds

Parameters:
NameTypeDescription
timeoutnumber

How long to wait for IE.

Returns:

A self reference.

Type: 
Options

forceCreateProcessApi(force) → (non-null) {Options}

Configures whether to launch Internet Explorer using the CreateProcess API. If this option is not specified, IE is launched using IELaunchURL, if available. For IE 8 and above, this option requires the TabProcGrowth registry value to be set to 0.

Parameters:
NameTypeDescription
forceboolean

Whether to use the CreateProcess API.

Returns:

A self reference.

Type: 
Options

ignoreZoomSetting(ignore) → (non-null) {Options}

Indicates whether to skip the check that the browser's zoom level is set to 100%.

Parameters:
NameTypeDescription
ignoreboolean

Whether to ignore the browser's zoom level settings.

Returns:

A self reference.

Type: 
Options

initialBrowserUrl(url) → (non-null) {Options}

Sets the initial URL loaded when IE starts. This is intended to be used with #introduceFlakinessByIgnoringProtectedModeSettings to allow the user to initialize IE in the proper Protected Mode zone. Setting this option may cause browser instability or flaky and unresponsive code. Only "best effort" support is provided when using this option.

Parameters:
NameTypeDescription
urlstring

The initial browser URL.

Returns:

A self reference.

Type: 
Options

introduceFlakinessByIgnoringProtectedModeSettings(ignoreSettings) → (non-null) {Options}

Whether to disable the protected mode settings check when the session is created. Disabling this setting may lead to significant instability as the browser may become unresponsive/hang. Only "best effort" support is provided when using this capability.

For more information, refer to the IEDriver's required system configuration.

Parameters:
NameTypeDescription
ignoreSettingsboolean

Whether to ignore protected mode settings.

Returns:

A self reference.

Type: 
Options

requireWindowFocus(require) → (non-null) {Options}

Configures whether to require the IE window to have input focus before performing any user interactions (i.e. mouse or keyboard events). This option is disabled by default, but delivers much more accurate interaction events when enabled.

Parameters:
NameTypeDescription
requireboolean

Whether to require window focus.

Returns:

A self reference.

Type: 
Options

setEdgeChromium(attachEdgeChromium) → (non-null) {Options}

Sets the IEDriver to drive Chromium-based Edge in Internet Explorer mode.

Parameters:
NameTypeDescription
attachEdgeChromiumboolean

Whether to run in Chromium-based-Edge in IE mode

Returns:

A self reference.

Type: 
Options

setEdgePath(path) → (non-null) {Options}

Sets the path of the EdgeChromium driver.

Parameters:
NameTypeDescription
pathstring

The EdgeChromium driver path.

Returns:

A self reference.

Type: 
Options

setExtractPath(path) → (non-null) {Options}

Sets the path of the temporary data directory to use.

Parameters:
NameTypeDescription
pathstring

The log file path.

Returns:

A self reference.

Type: 
Options

setHost(host) → (non-null) {Options}

Sets the IP address of the driver's host adapter.

Parameters:
NameTypeDescription
hoststring

The IP address to use.

Returns:

A self reference.

Type: 
Options

setLogFile(file) → (non-null) {Options}

Sets the path to the log file the driver should log to.

Parameters:
NameTypeDescription
filestring

The log file path.

Returns:

A self reference.

Type: 
Options

setLogLevel(level) → (non-null) {Options}

Sets the IEDriverServer's logging level.

Parameters:
NameTypeDescription
levelLevel

The logging level.

Returns:

A self reference.

Type: 
Options

setScrollBehavior(behavior) → (non-null) {Options}

Sets how elements should be scrolled into view for interaction.

Parameters:
NameTypeDescription
behaviornumber

The desired scroll behavior: either 0 to align with the top of the viewport or 1 to align with the bottom.

Returns:

A self reference.

Type: 
Options

silent(silent) → (non-null) {Options}

Sets whether the driver should start in silent mode.

Parameters:
NameTypeDescription
silentboolean

Whether to run in silent mode.

Returns:

A self reference.

Type: 
Options

usePerProcessProxy(enable) → (non-null) {Options}

Configures whether proxies should be configured on a per-process basis. If not set, setting a proxy will configure the system proxy. The default behavior is to use the system proxy.

Parameters:
NameTypeDescription
enableboolean

Whether to enable per-process proxy settings.

Returns:

A self reference.

Type: 
Options
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/ie~ Options

Class for managing IEDriver specific options.

Constructor

new Options(otheropt)

Parameters:
NameTypeAttributesDescription
otherCapabilities | Map.<string, ?> | Object<optional>

Another set of capabilities to initialize this instance from.

Source

Methods

addArguments(…args) → (non-null) {Options}

Specifies command-line switches to use when launching Internet Explorer. This is only valid when used with #forceCreateProcessApi.

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The arguments to add.

Deprecated
  • Use #addBrowserCommandSwitches instead.
Returns:

A self reference.

Type: 
Options

addBrowserCommandSwitches(…args) → (non-null) {Options}

Specifies command-line switches to use when launching Internet Explorer. This is only valid when used with #forceCreateProcessApi.

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The arguments to add.

Returns:

A self reference.

Type: 
Options

browserAttachTimeout(timeout) → (non-null) {Options}

Configures the timeout, in milliseconds, that the driver will attempt to located and attach to a newly opened instance of Internet Explorer. The default is zero, which indicates waiting indefinitely.

Parameters:
NameTypeDescription
timeoutnumber

How long to wait for IE.

Returns:

A self reference.

Type: 
Options

enableElementCacheCleanup(enable) → (non-null) {Options}

Configures whether the driver should attempt to remove obsolete WebElements from its internal cache on page navigation (true by default). Disabling this option will cause the driver to run with a larger memory footprint.

Parameters:
NameTypeDescription
enableboolean

Whether to enable element reference cleanup.

Returns:

A self reference.

Type: 
Options

enablePersistentHover(enable) → (non-null) {Options}

Configures whether to enable persistent mouse hovering (true by default). Persistent hovering is achieved by continuously firing mouse over events at the last location the mouse cursor has been moved to.

Parameters:
NameTypeDescription
enableboolean

Whether to enable persistent hovering.

Returns:

A self reference.

Type: 
Options

ensureCleanSession(cleanSession) → (non-null) {Options}

Configures whether to clear the cache, cookies, history, and saved form data before starting the browser. Using this capability will clear session data for all running instances of Internet Explorer, including those started manually.

Parameters:
NameTypeDescription
cleanSessionboolean

Whether to clear all session data on startup.

Returns:

A self reference.

Type: 
Options

fileUploadDialogTimeout(timeout) → (non-null) {Options}

The options File Upload Dialog Timeout in milliseconds

Parameters:
NameTypeDescription
timeoutnumber

How long to wait for IE.

Returns:

A self reference.

Type: 
Options

forceCreateProcessApi(force) → (non-null) {Options}

Configures whether to launch Internet Explorer using the CreateProcess API. If this option is not specified, IE is launched using IELaunchURL, if available. For IE 8 and above, this option requires the TabProcGrowth registry value to be set to 0.

Parameters:
NameTypeDescription
forceboolean

Whether to use the CreateProcess API.

Returns:

A self reference.

Type: 
Options

ignoreZoomSetting(ignore) → (non-null) {Options}

Indicates whether to skip the check that the browser's zoom level is set to 100%.

Parameters:
NameTypeDescription
ignoreboolean

Whether to ignore the browser's zoom level settings.

Returns:

A self reference.

Type: 
Options

initialBrowserUrl(url) → (non-null) {Options}

Sets the initial URL loaded when IE starts. This is intended to be used with #introduceFlakinessByIgnoringProtectedModeSettings to allow the user to initialize IE in the proper Protected Mode zone. Setting this option may cause browser instability or flaky and unresponsive code. Only "best effort" support is provided when using this option.

Parameters:
NameTypeDescription
urlstring

The initial browser URL.

Returns:

A self reference.

Type: 
Options

introduceFlakinessByIgnoringProtectedModeSettings(ignoreSettings) → (non-null) {Options}

Whether to disable the protected mode settings check when the session is created. Disabling this setting may lead to significant instability as the browser may become unresponsive/hang. Only "best effort" support is provided when using this capability.

For more information, refer to the IEDriver's required system configuration.

Parameters:
NameTypeDescription
ignoreSettingsboolean

Whether to ignore protected mode settings.

Returns:

A self reference.

Type: 
Options

requireWindowFocus(require) → (non-null) {Options}

Configures whether to require the IE window to have input focus before performing any user interactions (i.e. mouse or keyboard events). This option is disabled by default, but delivers much more accurate interaction events when enabled.

Parameters:
NameTypeDescription
requireboolean

Whether to require window focus.

Returns:

A self reference.

Type: 
Options

setEdgeChromium(attachEdgeChromium) → (non-null) {Options}

Sets the IEDriver to drive Chromium-based Edge in Internet Explorer mode.

Parameters:
NameTypeDescription
attachEdgeChromiumboolean

Whether to run in Chromium-based-Edge in IE mode

Returns:

A self reference.

Type: 
Options

setEdgePath(path) → (non-null) {Options}

Sets the path of the EdgeChromium driver.

Parameters:
NameTypeDescription
pathstring

The EdgeChromium driver path.

Returns:

A self reference.

Type: 
Options

setExtractPath(path) → (non-null) {Options}

Sets the path of the temporary data directory to use.

Parameters:
NameTypeDescription
pathstring

The log file path.

Returns:

A self reference.

Type: 
Options

setHost(host) → (non-null) {Options}

Sets the IP address of the driver's host adapter.

Parameters:
NameTypeDescription
hoststring

The IP address to use.

Returns:

A self reference.

Type: 
Options

setLogFile(file) → (non-null) {Options}

Sets the path to the log file the driver should log to.

Parameters:
NameTypeDescription
filestring

The log file path.

Returns:

A self reference.

Type: 
Options

setLogLevel(level) → (non-null) {Options}

Sets the IEDriverServer's logging level.

Parameters:
NameTypeDescription
levelLevel

The logging level.

Returns:

A self reference.

Type: 
Options

setScrollBehavior(behavior) → (non-null) {Options}

Sets how elements should be scrolled into view for interaction.

Parameters:
NameTypeDescription
behaviornumber

The desired scroll behavior: either 0 to align with the top of the viewport or 1 to align with the bottom.

Returns:

A self reference.

Type: 
Options

silent(silent) → (non-null) {Options}

Sets whether the driver should start in silent mode.

Parameters:
NameTypeDescription
silentboolean

Whether to run in silent mode.

Returns:

A self reference.

Type: 
Options

usePerProcessProxy(enable) → (non-null) {Options}

Configures whether proxies should be configured on a per-process basis. If not set, setting a proxy will configure the system proxy. The default behavior is to use the system proxy.

Parameters:
NameTypeDescription
enableboolean

Whether to enable per-process proxy settings.

Returns:

A self reference.

Type: 
Options
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_ie-ServiceBuilder.html b/docs/api/javascript/module-selenium-webdriver_ie-ServiceBuilder.html index f11dbbb8e3567..98360ed9c937c 100644 --- a/docs/api/javascript/module-selenium-webdriver_ie-ServiceBuilder.html +++ b/docs/api/javascript/module-selenium-webdriver_ie-ServiceBuilder.html @@ -1,3 +1,3 @@ Class: ServiceBuilder
On this page

selenium-webdriver/ie~ ServiceBuilder

Creates selenium-webdriver/remote.DriverService instances that manage an IEDriverServer server in a child process.

Constructor

new ServiceBuilder(opt_exeopt)

Parameters:
NameTypeAttributesDescription
opt_exestring<optional>

Path to the server executable to use. If omitted, the builder will attempt to locate the IEDriverServer on the system PATH.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/ie~ ServiceBuilder

Creates selenium-webdriver/remote.DriverService instances that manage an IEDriverServer server in a child process.

Constructor

new ServiceBuilder(opt_exeopt)

Parameters:
NameTypeAttributesDescription
opt_exestring<optional>

Path to the server executable to use. If omitted, the builder will attempt to locate the IEDriverServer on the system PATH.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_ie.html b/docs/api/javascript/module-selenium-webdriver_ie.html index 2332f7ba9e8da..72b80b215835d 100644 --- a/docs/api/javascript/module-selenium-webdriver_ie.html +++ b/docs/api/javascript/module-selenium-webdriver_ie.html @@ -1,3 +1,3 @@ Module: selenium-webdriver/ie
On this page

selenium-webdriver/ie

Defines a WebDriver client for Microsoft's Internet Explorer. Before using the IEDriver, you must download the latest IEDriverServer and place it on your PATH. You must also apply the system configuration outlined on the Selenium project wiki

Source

Classes

Driver
Options
ServiceBuilder

Members

(inner, constant) Key :string

Option keys: https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities#ie-specific

Type:
  • string
Properties
NameTypeDescription
IGNORE_PROTECTED_MODE_SETTINGSstring
IGNORE_ZOOM_SETTINGstring
INITIAL_BROWSER_URLstring
ENABLE_PERSISTENT_HOVERstring
ENABLE_ELEMENT_CACHE_CLEANUPstring
ELEMENT_SCROLL_BEHAVIORstring
REQUIRE_WINDOW_FOCUSstring
BROWSER_ATTACH_TIMEOUTstring
FORCE_CREATE_PROCESSstring
BROWSER_COMMAND_LINE_SWITCHESstring
USE_PER_PROCESS_PROXYstring
ENSURE_CLEAN_SESSIONstring
LOG_FILEstring
LOG_LEVELstring
HOSTstring
EXTRACT_PATHstring
SILENTstring
FILE_UPLOAD_DIALOG_TIMEOUTstring
ATTACH_TO_EDGE_CHROMIUMstring
EDGE_EXECUTABLE_PATHstring
IGNORE_PROCESS_MATCHstring
Source

(inner, constant) Level :string

IEDriverServer logging levels.

Type:
  • string
Properties
NameTypeDescription
FATALstring
ERRORstring
WARNstring
INFOstring
DEBUGstring
TRACEstring
Source
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/ie

Defines a WebDriver client for Microsoft's Internet Explorer. Before using the IEDriver, you must download the latest IEDriverServer and place it on your PATH. You must also apply the system configuration outlined on the Selenium project wiki

Source

Classes

Driver
Options
ServiceBuilder

Members

(inner, constant) Key :string

Option keys: https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities#ie-specific

Type:
  • string
Properties
NameTypeDescription
IGNORE_PROTECTED_MODE_SETTINGSstring
IGNORE_ZOOM_SETTINGstring
INITIAL_BROWSER_URLstring
ENABLE_PERSISTENT_HOVERstring
ENABLE_ELEMENT_CACHE_CLEANUPstring
ELEMENT_SCROLL_BEHAVIORstring
REQUIRE_WINDOW_FOCUSstring
BROWSER_ATTACH_TIMEOUTstring
FORCE_CREATE_PROCESSstring
BROWSER_COMMAND_LINE_SWITCHESstring
USE_PER_PROCESS_PROXYstring
ENSURE_CLEAN_SESSIONstring
LOG_FILEstring
LOG_LEVELstring
HOSTstring
EXTRACT_PATHstring
SILENTstring
FILE_UPLOAD_DIALOG_TIMEOUTstring
ATTACH_TO_EDGE_CHROMIUMstring
EDGE_EXECUTABLE_PATHstring
IGNORE_PROCESS_MATCHstring
Source

(inner, constant) Level :string

IEDriverServer logging levels.

Type:
  • string
Properties
NameTypeDescription
FATALstring
ERRORstring
WARNstring
INFOstring
DEBUGstring
TRACEstring
Source
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_safari-Driver.html b/docs/api/javascript/module-selenium-webdriver_safari-Driver.html index 4f61e881a5d1f..eb31310124ce8 100644 --- a/docs/api/javascript/module-selenium-webdriver_safari-Driver.html +++ b/docs/api/javascript/module-selenium-webdriver_safari-Driver.html @@ -1,6 +1,6 @@ Class: Driver
On this page

selenium-webdriver/safari~ Driver

A WebDriver client for Safari. This class should never be instantiated directly; instead, use the Builder:

var driver = new Builder()
+    
On this page

selenium-webdriver/safari~ Driver

A WebDriver client for Safari. This class should never be instantiated directly; instead, use the Builder:

var driver = new Builder()
     .forBrowser('safari')
     .build();
-

Constructor

new Driver()

Methods

(static) createSession(optionsopt) → (non-null) {Driver}

Creates a new Safari session.

Parameters:
NameTypeAttributesDescription
optionsOptions | Capabilities<optional>

The configuration options.

Returns:

A new driver instance.

Type: 
Driver
Selenium WebDriver JavaScript API
\ No newline at end of file +

Constructor

new Driver()

Methods

(static) createSession(optionsopt) → (non-null) {Driver}

Creates a new Safari session.

Parameters:
NameTypeAttributesDescription
optionsOptions | Capabilities<optional>

The configuration options.

Returns:

A new driver instance.

Type: 
Driver
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_safari-Options.html b/docs/api/javascript/module-selenium-webdriver_safari-Options.html index 075349f8be146..8a89e88321d2a 100644 --- a/docs/api/javascript/module-selenium-webdriver_safari-Options.html +++ b/docs/api/javascript/module-selenium-webdriver_safari-Options.html @@ -1,3 +1,3 @@ Class: Options
On this page

selenium-webdriver/safari~ Options

Configuration options specific to the SafariDriver.

Constructor

new Options(otheropt)

Parameters:
NameTypeAttributesDescription
otherCapabilities | Map.<string, ?> | Object<optional>

Another set of capabilities to initialize this instance from.

Methods

enableLogging() → {Options}

Enables diagnostic logging for Safari.

This method sets the safari:diagnose option to true in the current configuration. It is used to enable additional logging or diagnostic features specific to Safari.

Returns:

Returns the current instance

Type: 
Options

setTechnologyPreview(useTechnologyPreview) → (non-null) {Options}

Instruct the SafariDriver to use the Safari Technology Preview if true. Otherwise, use the release version of Safari. Defaults to using the release version of Safari.

Parameters:
NameTypeDescription
useTechnologyPreviewboolean
Returns:

A self reference.

Type: 
Options
Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/safari~ Options

Configuration options specific to the SafariDriver.

Constructor

new Options(otheropt)

Parameters:
NameTypeAttributesDescription
otherCapabilities | Map.<string, ?> | Object<optional>

Another set of capabilities to initialize this instance from.

Methods

enableLogging() → {Options}

Enables diagnostic logging for Safari.

This method sets the safari:diagnose option to true in the current configuration. It is used to enable additional logging or diagnostic features specific to Safari.

Returns:

Returns the current instance

Type: 
Options

setTechnologyPreview(useTechnologyPreview) → (non-null) {Options}

Instruct the SafariDriver to use the Safari Technology Preview if true. Otherwise, use the release version of Safari. Defaults to using the release version of Safari.

Parameters:
NameTypeDescription
useTechnologyPreviewboolean
Returns:

A self reference.

Type: 
Options
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_safari-ServiceBuilder.html b/docs/api/javascript/module-selenium-webdriver_safari-ServiceBuilder.html index 2a2175315b208..5060f2fe22faa 100644 --- a/docs/api/javascript/module-selenium-webdriver_safari-ServiceBuilder.html +++ b/docs/api/javascript/module-selenium-webdriver_safari-ServiceBuilder.html @@ -1,3 +1,3 @@ Class: ServiceBuilder
On this page

selenium-webdriver/safari~ ServiceBuilder

Creates remote.DriverService instances that manage a safaridriver server in a child process.

Constructor

new ServiceBuilder(opt_exeopt)

Parameters:
NameTypeAttributesDescription
opt_exestring<optional>

Path to the server executable to use. If omitted, the builder will attempt to locate the safaridriver on the system PATH.

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/safari~ ServiceBuilder

Creates remote.DriverService instances that manage a safaridriver server in a child process.

Constructor

new ServiceBuilder(opt_exeopt)

Parameters:
NameTypeAttributesDescription
opt_exestring<optional>

Path to the server executable to use. If omitted, the builder will attempt to locate the safaridriver on the system PATH.

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/module-selenium-webdriver_safari.html b/docs/api/javascript/module-selenium-webdriver_safari.html index 7b6942bfd9c17..57aec21836149 100644 --- a/docs/api/javascript/module-selenium-webdriver_safari.html +++ b/docs/api/javascript/module-selenium-webdriver_safari.html @@ -1,3 +1,3 @@ Module: selenium-webdriver/safari
On this page

selenium-webdriver/safari

Selenium WebDriver JavaScript API
\ No newline at end of file +
On this page

selenium-webdriver/safari

Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/net_index.js.html b/docs/api/javascript/net_index.js.html index 5bae7bcea0484..1a0a7d567045e 100644 --- a/docs/api/javascript/net_index.js.html +++ b/docs/api/javascript/net_index.js.html @@ -1,6 +1,6 @@ Source: net/index.js
On this page

net_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

net_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -114,4 +114,4 @@
   getLoopbackAddress,
   getAddress,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/net_portprober.js.html b/docs/api/javascript/net_portprober.js.html index 18a96f96bb353..21a752b48f6a5 100644 --- a/docs/api/javascript/net_portprober.js.html +++ b/docs/api/javascript/net_portprober.js.html @@ -1,6 +1,6 @@ Source: net/portprober.js
On this page

net_portprober.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

net_portprober.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -76,4 +76,4 @@
   findFreePort,
   isFree,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/proxy.js.html b/docs/api/javascript/proxy.js.html index 07bb7e8ae7d28..16e1ac9f11e8e 100644 --- a/docs/api/javascript/proxy.js.html +++ b/docs/api/javascript/proxy.js.html @@ -1,6 +1,6 @@ Source: proxy.js
On this page

proxy.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

proxy.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -32,4 +32,4 @@
 'use strict'
 
 module.exports = require('./lib/proxy')
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/remote_index.js.html b/docs/api/javascript/remote_index.js.html index e71317982b87e..3846223a9d4fa 100644 --- a/docs/api/javascript/remote_index.js.html +++ b/docs/api/javascript/remote_index.js.html @@ -1,6 +1,6 @@ Source: remote/index.js
On this page

remote_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

remote_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -621,4 +621,4 @@
   // Exported for API docs.
   ServiceOptions,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/remote_util.js.html b/docs/api/javascript/remote_util.js.html index 965c6e63d0dde..cbc79085b842d 100644 --- a/docs/api/javascript/remote_util.js.html +++ b/docs/api/javascript/remote_util.js.html @@ -1,6 +1,6 @@ Source: remote/util.js
On this page

remote_util.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

remote_util.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -87,4 +87,4 @@
   isSelenium3x,
   formatSpawnArgs,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/safari.js.html b/docs/api/javascript/safari.js.html index d3bc208967ab1..ec6a681383f7e 100644 --- a/docs/api/javascript/safari.js.html +++ b/docs/api/javascript/safari.js.html @@ -1,6 +1,6 @@ Source: safari.js
On this page

safari.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

safari.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -153,4 +153,4 @@
 exports.Driver = Driver
 exports.Options = Options
 exports.ServiceBuilder = ServiceBuilder
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/test_driver_factory.js.html b/docs/api/javascript/test_driver_factory.js.html index 94baacc485c68..bfdeb46e7cb0a 100644 --- a/docs/api/javascript/test_driver_factory.js.html +++ b/docs/api/javascript/test_driver_factory.js.html @@ -1,6 +1,6 @@ Source: test/driver_factory.js
On this page

test_driver_factory.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

test_driver_factory.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -105,4 +105,4 @@
 module.exports = {
   GetBrowserForTests,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/test_virtualAuthenticator_test.js.html b/docs/api/javascript/test_virtualAuthenticator_test.js.html index 931e2d5572cb3..2793eedb622de 100644 --- a/docs/api/javascript/test_virtualAuthenticator_test.js.html +++ b/docs/api/javascript/test_virtualAuthenticator_test.js.html @@ -1,6 +1,6 @@ Source: test/virtualAuthenticator_test.js
On this page

test_virtualAuthenticator_test.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

test_virtualAuthenticator_test.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -457,4 +457,4 @@
     })
   })
 })
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file diff --git a/docs/api/javascript/testing_index.js.html b/docs/api/javascript/testing_index.js.html index b7302e6a61956..1710677a75dc6 100644 --- a/docs/api/javascript/testing_index.js.html +++ b/docs/api/javascript/testing_index.js.html @@ -1,6 +1,6 @@ Source: testing/index.js
On this page

testing_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
+    
On this page

testing_index.js

// Licensed to the Software Freedom Conservancy (SFC) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The SFC licenses this file
@@ -615,4 +615,4 @@
   ignore,
   suite,
 }
-
Selenium WebDriver JavaScript API
\ No newline at end of file +
Selenium WebDriver JavaScript API
\ No newline at end of file