selenium-webdriver
Advanced tools
Comparing version 4.1.2 to 4.2.0
395
CHANGES.md
@@ -0,1 +1,11 @@ | ||
## v4.2.0 | ||
* Delete old android-driver | ||
* Remove Opera support from JS bindings #10379 | ||
* Handle a breaking changes in os.networkInterfaces (#10611) | ||
* Add support to switch frame by id | ||
* Add support to switch frame by name (#10670) | ||
* [cdp] add support Chrome 102 and remove for Chrome 98 | ||
* Update implementation for submitting forms | ||
## v4.1.2 | ||
@@ -109,3 +119,3 @@ | ||
* JS Binding support for WebDriver Bidi in Firefox | ||
- This requires Firefox 87 and Geckodriver 0.29 to be able to work | ||
- This requires Firefox 87 and Geckodriver 0.29 to be able to work | ||
* Update the supported CDP versions | ||
@@ -124,7 +134,7 @@ * Update tmp package version (#9155) | ||
* Added new ieOptions capabilities: | ||
- fileUploadDialogTimeout | ||
- setEdgePath | ||
- setEdgeChromium | ||
- setScrollBehavior | ||
- For consistent naming, deprecating `addArguments(...args)` in favor of `addBrowserCommandSwitches(...args)` | ||
- fileUploadDialogTimeout | ||
- setEdgePath | ||
- setEdgeChromium | ||
- setScrollBehavior | ||
- For consistent naming, deprecating `addArguments(...args)` in favor of `addBrowserCommandSwitches(...args)` | ||
@@ -185,9 +195,7 @@ * Added relative locators | ||
* Revamped the actions API to conform with the WebDriver Spec: | ||
<https://www.w3.org/TR/webdriver/#actions>. For details, refer to the JS doc on | ||
the `lib/input.Actions` class. | ||
<https://www.w3.org/TR/webdriver/#actions>. For details, refer to the JS doc on the `lib/input.Actions` class. | ||
As of January, 2018, only Firefox natively supports this new API. You can put the `Actions` class | ||
into "bridge mode" and it will attempt to translate mouse and keyboard actions to the legacy API ( | ||
see class docs). Alternatively, you may continue to use the legacy API directly via | ||
the `lib/actions` module. | ||
see class docs). Alternatively, you may continue to use the legacy API directly via the `lib/actions` module. | ||
__NOTE:__ The legacy API is considered strongly deprecated and will be removed in a minor release | ||
@@ -198,7 +206,5 @@ once Google's Chrome and Microsoft's Edge browsers support the new API. | ||
* Added `driver.switchTo().parentFrame()` | ||
* When a named cookie is requested, attempt to fetch it directly using the W3C | ||
endpoint, `GET /session/{session id}/cookie/{name}`. If this command is not recognized by the | ||
* When a named cookie is requested, attempt to fetch it directly using the W3C endpoint, `GET /session/{session id}/cookie/{name}`. If this command is not recognized by the | ||
remote end, fallback to fetching all cookies and then searching for the desired name. | ||
* Replaced `WebElement.getSize()` and `WebElement.getLocation()` with a single | ||
method, `WebElement.getRect()`. | ||
* Replaced `WebElement.getSize()` and `WebElement.getLocation()` with a single method, `WebElement.getRect()`. | ||
@@ -208,7 +214,7 @@ ### API Changes | ||
* The core WebDriver API no longer uses promise manager | ||
- Removed `index.Builder#setControlFlow()` | ||
- The following thenable types no longer have a `cancel()` method: | ||
- The dynamically generated thenable WebDrivers created by `index.Builder` | ||
- `lib/webdriver.AlertPromise` | ||
- `lib/webdriver.WebElementPromise` | ||
- Removed `index.Builder#setControlFlow()` | ||
- The following thenable types no longer have a `cancel()` method: | ||
- The dynamically generated thenable WebDrivers created by `index.Builder` | ||
- `lib/webdriver.AlertPromise` | ||
- `lib/webdriver.WebElementPromise` | ||
* Removed `remote/index.DriverService.prototype.stop()` (use `#kill()` instead) | ||
@@ -221,123 +227,120 @@ * Removed the `lib/actions` module | ||
exported names (replacements, if any, in parentheses): | ||
- CancellableThenable | ||
- CancellationError | ||
- ControlFlow | ||
- Deferred | ||
- LONG_STACK_TRACES | ||
- MultipleUnhandledRejectionError | ||
- Promise (use native Promises) | ||
- Resolver | ||
- Scheduler | ||
- Thenable | ||
- USE_PROMISE_MANAGER | ||
- all (use Promise.all) | ||
- asap (use Promise.resolve) | ||
- captureStackTrace (use Error.captureStackTrace) | ||
- consume (use async functions) | ||
- controlFlow | ||
- createPromise (use new Promise) | ||
- defer | ||
- fulfilled (use Promise.resolve) | ||
- isGenerator | ||
- rejected (use Promise.reject) | ||
- setDefaultFlow | ||
- when (use Promise.resolve) | ||
- CancellableThenable | ||
- CancellationError | ||
- ControlFlow | ||
- Deferred | ||
- LONG_STACK_TRACES | ||
- MultipleUnhandledRejectionError | ||
- Promise (use native Promises) | ||
- Resolver | ||
- Scheduler | ||
- Thenable | ||
- USE_PROMISE_MANAGER | ||
- all (use Promise.all) | ||
- asap (use Promise.resolve) | ||
- captureStackTrace (use Error.captureStackTrace) | ||
- consume (use async functions) | ||
- controlFlow | ||
- createPromise (use new Promise) | ||
- defer | ||
- fulfilled (use Promise.resolve) | ||
- isGenerator | ||
- rejected (use Promise.reject) | ||
- setDefaultFlow | ||
- when (use Promise.resolve) | ||
* Changes to the `Builder` class: | ||
- Added setChromeService, setEdgeService, & setFirefoxService | ||
- Removed setEnableNativeEvents | ||
- Removed setScrollBehavior | ||
- Added setChromeService, setEdgeService, & setFirefoxService | ||
- Removed setEnableNativeEvents | ||
- Removed setScrollBehavior | ||
* Changes to `chrome.Driver` | ||
- Added sendDevToolsCommand | ||
- Added setDownloadPath | ||
- Added sendDevToolsCommand | ||
- Added setDownloadPath | ||
* Changes to `chrome.Options` | ||
- Now extends the `Capabilities` class | ||
- Removed from/toCapabilities | ||
- Now extends the `Capabilities` class | ||
- Removed from/toCapabilities | ||
* Changes to `edge.Options` | ||
- Now extends the `Capabilities` class | ||
- Removed from/toCapabilities | ||
- Now extends the `Capabilities` class | ||
- Removed from/toCapabilities | ||
* Changes to `ie.Options` | ||
- Now extends the `Capabilities` class | ||
- Removed from/toCapabilities | ||
* Removed the `firefox.Binary` class. Custom binaries can still be selected | ||
using `firefox.Options#setBinary()`. Likewise, custom binary arguments can be specified | ||
- Now extends the `Capabilities` class | ||
- Removed from/toCapabilities | ||
* Removed the `firefox.Binary` class. Custom binaries can still be selected using `firefox.Options#setBinary()`. Likewise, custom binary arguments can be specified | ||
with `firefox.Options#addArguments()`. | ||
* Changes to `firefox.Driver` | ||
- Added installAddon(path) | ||
- Added uninstallAddon(id) | ||
- Added installAddon(path) | ||
- Added uninstallAddon(id) | ||
* Changes to `firefox.Options` | ||
- Now extends the `Capabilities` class | ||
- Removed from/toCapabilities | ||
- Removed setLoggingPreferences (was a no-op) | ||
- setProfile now only accepts a path to an existing profile | ||
- Added addExtensions | ||
- Added setPreference | ||
* Removed the `firefox.Profile` class. All of its functionality is now provided directly | ||
by `firefox.Options` | ||
- Now extends the `Capabilities` class | ||
- Removed from/toCapabilities | ||
- Removed setLoggingPreferences (was a no-op) | ||
- setProfile now only accepts a path to an existing profile | ||
- Added addExtensions | ||
- Added setPreference | ||
* Removed the `firefox.Profile` class. All of its functionality is now provided directly by `firefox.Options` | ||
* Removed the `firefox/binary` module | ||
* Removed the `firefox/profile` module | ||
* Changes to `safari.Options` | ||
- Now extends the `Capabilities` class | ||
- Removed from/toCapabilities | ||
- Removed setCleanSession (was a no-op) | ||
- Now extends the `Capabilities` class | ||
- Removed from/toCapabilities | ||
- Removed setCleanSession (was a no-op) | ||
* Changes to `lib/capabilities.Browser`: | ||
- Removed several enum values. | ||
- ANDROID (use Chrome for Android; see docs on the chrome module) | ||
- IPAD (no support available) | ||
- IPHONE (no support available) | ||
- OPERA (use Chrome) | ||
- PHANTOM_JS (use Chrome or Firefox in headless mode) | ||
- HTMLUNIT (use Chrome or Firefox in headless mode) | ||
- Removed several enum values. | ||
- ANDROID (use Chrome for Android; see docs on the chrome module) | ||
- IPAD (no support available) | ||
- IPHONE (no support available) | ||
- OPERA (use Chrome) | ||
- PHANTOM_JS (use Chrome or Firefox in headless mode) | ||
- HTMLUNIT (use Chrome or Firefox in headless mode) | ||
* Changes to `lib/capabilities.Capabilities`: | ||
- Removed static factory methods android(), ipad(), iphone(), opera(), phantomjs(), htmlunit(), | ||
and htmlunitwithjs(). Users can still manually configure capabilities for these, but their use | ||
is not recommended and they will no longer be surfaced in the API. | ||
- Removed static factory methods android(), ipad(), iphone(), opera(), phantomjs(), htmlunit(), | ||
and htmlunitwithjs(). Users can still manually configure capabilities for these, but their use | ||
is not recommended and they will no longer be surfaced in the API. | ||
* Changes to `lib/error`: | ||
- Added | ||
- ElementClickInterceptedError | ||
- InsecureCertificateError | ||
- InvalidCoordinatesError | ||
- NoSuchCookieError | ||
- Removed | ||
- ElementNotVisibleError | ||
- InvalidElementCoordinatesError | ||
- Added | ||
- ElementClickInterceptedError | ||
- InsecureCertificateError | ||
- InvalidCoordinatesError | ||
- NoSuchCookieError | ||
- Removed | ||
- ElementNotVisibleError | ||
- InvalidElementCoordinatesError | ||
* Changes to `lib/webdriver.WebDriver`: | ||
- Dropped support for "requiredCapabilities" from WebDriver.createSession | ||
- actions() now returns the new `lib/input.Actions` class | ||
- Removed touchActions | ||
- Renamed schedule to execute | ||
- Removed the `WebDriver.attachToSession()` factory method. Users can just the `WebDriver` | ||
constructor directly instead. | ||
- Removed the `call()` method. This was used to inject custom function calls into the control | ||
flow. Now that the promise manager is no longer used, this method is no longer necessary. | ||
Users are now responsible for coordinating actions (ideally with async functions) and can just | ||
call functions directly instead of through `driver.call()`. | ||
- Dropped support for "requiredCapabilities" from WebDriver.createSession | ||
- actions() now returns the new `lib/input.Actions` class | ||
- Removed touchActions | ||
- Renamed schedule to execute | ||
- Removed the `WebDriver.attachToSession()` factory method. Users can just the `WebDriver` | ||
constructor directly instead. | ||
- Removed the `call()` method. This was used to inject custom function calls into the control | ||
flow. Now that the promise manager is no longer used, this method is no longer necessary. Users are now responsible for coordinating actions (ideally with async functions) and can just | ||
call functions directly instead of through `driver.call()`. | ||
* Changes to `lib/webdriver.WebElement`: | ||
- Replaced getSize & getLocation with getRect | ||
- Replaced getSize & getLocation with getRect | ||
* Changes to `lib/webdriver.Alert`: | ||
- Removed authenticateAs | ||
- Removed authenticateAs | ||
* Changes to `lib/webdriver.Options` (`driver.manage()`): | ||
- Removed timeouts (use get/setTimeouts) | ||
- Removed timeouts (use get/setTimeouts) | ||
* Changes to `lib/webdriver.Window` (`driver.manage().window()`): | ||
- Added | ||
- getRect | ||
- setRect | ||
- fullscreen | ||
- minimize | ||
- Removed (use the getRect/setRect methods) | ||
- getPosition | ||
- setPosition | ||
- getSize | ||
- setSize | ||
- Added | ||
- getRect | ||
- setRect | ||
- fullscreen | ||
- minimize | ||
- Removed (use the getRect/setRect methods) | ||
- getPosition | ||
- setPosition | ||
- getSize | ||
- setSize | ||
* Removed the `testing/assert` module | ||
* Changes to `testing/index` | ||
- Since the promise manager has been removed, it is no longer necessary to wrap the Mocha test | ||
hooks; instead, users can simply use async functions. The following have all been removed: | ||
- describe | ||
- before | ||
- beforeEach | ||
- after | ||
- afterEach | ||
- it | ||
- Added the `suite` function. For details, refer to the jsdoc or | ||
`example/google_search_test.js` | ||
- Since the promise manager has been removed, it is no longer necessary to wrap the Mocha test | ||
hooks; instead, users can simply use async functions. The following have all been removed: | ||
- describe | ||
- before | ||
- beforeEach | ||
- after | ||
- afterEach | ||
- it | ||
- Added the `suite` function. For details, refer to the jsdoc or | ||
`example/google_search_test.js` | ||
@@ -358,5 +361,5 @@ ## v3.6.0 | ||
* Added new methods to `selenium-webdriver/firefox.Options`: | ||
- addArguments() | ||
- headless() | ||
- windowSize() | ||
- addArguments() | ||
- headless() | ||
- windowSize() | ||
* Deprecated `selenium-webdriver/firefox/binary.Binary` | ||
@@ -367,6 +370,6 @@ * Removed `selenium-webdriver/firefox.Options#useGeckoDriver()` | ||
for the legacy FirefoxDriver was dropped in 3.5.0: | ||
- setNativeEventsEnabled | ||
- nativeEventsEnabled | ||
- getPort | ||
- setPort | ||
- setNativeEventsEnabled | ||
- nativeEventsEnabled | ||
- getPort | ||
- setPort | ||
* Removed `selenium-webdriver/firefox.ServiceBuilder#setFirefoxBinary()`; custom binaries should be | ||
@@ -393,8 +396,7 @@ configured through the `firefox.Options` class. | ||
* Removed native support for Firefox 46 and older. | ||
- The `SELENIUM_MARIONETTE` enviornment variable no longer has an effect. | ||
- `selenium-webdriver/firefox.Capability.MARIONETTE` is deprecated. | ||
- `selenium-webdriver/firefox.Options#useGeckoDriver()` is deprecated and now a no-op. | ||
- The `SELENIUM_MARIONETTE` enviornment variable no longer has an effect. | ||
- `selenium-webdriver/firefox.Capability.MARIONETTE` is deprecated. | ||
- `selenium-webdriver/firefox.Options#useGeckoDriver()` is deprecated and now a no-op. | ||
* `firefox.Options` will no longer discard the `"moz:firefoxOptions"` set in user provided | ||
capabilities (via `Builder.withCapabilities({})`). When both are used, the settings | ||
in `firefox.Options` will be applied _last_. | ||
capabilities (via `Builder.withCapabilities({})`). When both are used, the settings in `firefox.Options` will be applied _last_. | ||
* Added `chrome.Options#headless()` and `chrome.Options#windowSize()`, which may be used to start | ||
@@ -451,4 +453,3 @@ Chrome in headless mode (requires Chrome 59+) and to set the initial window size, respectively. | ||
* The `lib` package is once again platform agnostic (excluding `lib/devmode`). | ||
* Deprecated `promise.when(value, callback, errback)`. | ||
Use `promise.fulfilled(value).then(callback, errback)` | ||
* Deprecated `promise.when(value, callback, errback)`. Use `promise.fulfilled(value).then(callback, errback)` | ||
* Changed `promise.fulfilled(value)`, `promise.rejected(reason)` and | ||
@@ -470,6 +471,5 @@ `promise.defer()` to all use native promises when the promise manager is disabled. | ||
* More API adjustments to align with native Promises | ||
- Deprecated `promise.fulfilled(value)`, use `promise.Promise#resolve(value)` | ||
- Deprecated `promise.rejected(reason)`, use `promise.Promise#reject(reason)` | ||
* When a `wait()` condition times out, the returned promise will now be rejected with | ||
an `error.TimeoutError` instead of a generic `Error` object. | ||
- Deprecated `promise.fulfilled(value)`, use `promise.Promise#resolve(value)` | ||
- Deprecated `promise.rejected(reason)`, use `promise.Promise#reject(reason)` | ||
* When a `wait()` condition times out, the returned promise will now be rejected with an `error.TimeoutError` instead of a generic `Error` object. | ||
* `WebDriver#wait()` will now throw a TypeError if an invalid wait condition is provided. | ||
@@ -501,4 +501,3 @@ * Properly catch unhandled promise rejections with an action sequence (only impacts when the promise | ||
<https://github.com/SeleniumHQ/selenium/issues/2969> | ||
* When communicating with a W3C-compliant remote end, use the atoms library for | ||
the `WebElement.getAttribute()` and `WebElement.isDisplayed()` commands. This behavior is | ||
* When communicating with a W3C-compliant remote end, use the atoms library for the `WebElement.getAttribute()` and `WebElement.isDisplayed()` commands. This behavior is | ||
consistent with the java, .net, python, and ruby clients. | ||
@@ -510,7 +509,6 @@ | ||
* Reduced the API on `promise.Thenable` for compatibility with native promises: | ||
- Removed `#isPending()` | ||
- Removed `#cancel()` | ||
- Removed `#finally()` | ||
* Changed all subclasses of `webdriver.WebDriver` to overload the static | ||
function `WebDriver.createSession()` instead of doing work in the constructor. All constructors | ||
- Removed `#isPending()` | ||
- Removed `#cancel()` | ||
- Removed `#finally()` | ||
* Changed all subclasses of `webdriver.WebDriver` to overload the static function `WebDriver.createSession()` instead of doing work in the constructor. All constructors | ||
now inherit the base class' function signature. Users are still encouraged to use the `Builder` | ||
@@ -528,6 +526,4 @@ class instead of creating drivers directly. | ||
unhandled promise rejection. | ||
* Added the `firefox.ServiceBuilder` class, which may be used to customize the geckodriver used | ||
for `firefox.Driver` instances. | ||
* Added support for Safari 10 safaridriver. safaridriver may be disabled via tha | ||
API, `safari.Options#useLegacyDriver`, to use the safari extension driver. | ||
* Added the `firefox.ServiceBuilder` class, which may be used to customize the geckodriver used for `firefox.Driver` instances. | ||
* Added support for Safari 10 safaridriver. safaridriver may be disabled via tha API, `safari.Options#useLegacyDriver`, to use the safari extension driver. | ||
* Updated the `lib/proxy` module to support configuring a SOCKS proxy. | ||
@@ -583,4 +579,3 @@ * For the `promise.ControlFlow`, fire the "uncaughtException" event in a new turn of the JS event | ||
instead of a `command.DeferredExecutor` when creating WebDriver instances. | ||
* For Chrome and Firefox, the `builder.Builder` class will always return an | ||
instanceof `chrome.Driver` and `firefox.Driver`, respectively, even when configured to use a | ||
* For Chrome and Firefox, the `builder.Builder` class will always return an instanceof `chrome.Driver` and `firefox.Driver`, respectively, even when configured to use a | ||
remote server (from `builder.Builder#usingServer(url)`, | ||
@@ -598,28 +593,28 @@ `SELENIUM_REMOTE_URL`, etc). | ||
* Removed deprecated modules: | ||
- `selenium-webdriver/error` (use `selenium-webdriver/lib/error`,\ | ||
or the `error` property exported by `selenium-webdriver`) | ||
- `selenium-webdriver/executors` — this was not previously deprecated, but is no longer used. | ||
- `selenium-webdriver/error` (use `selenium-webdriver/lib/error`,\ | ||
or the `error` property exported by `selenium-webdriver`) | ||
- `selenium-webdriver/executors` — this was not previously deprecated, but is no longer used. | ||
* Removed deprecated types: | ||
- `command.DeferredExecutor` — this was not previously deprecated, but is no longer used. It can | ||
be trivially implemented by clients should it be needed. | ||
- `error.InvalidSessionIdError` (use `error.NoSuchSessionError`) | ||
- `executors.DeferredExecutor` | ||
- `until.Condition` (use `webdriver.Condition`) | ||
- `until.WebElementCondition` (use `webdriver.WebElementCondition`) | ||
- `webdriver.UnhandledAlertError` (use `error.UnexpectedAlertOpenError`) | ||
- `command.DeferredExecutor` — this was not previously deprecated, but is no longer used. It can | ||
be trivially implemented by clients should it be needed. | ||
- `error.InvalidSessionIdError` (use `error.NoSuchSessionError`) | ||
- `executors.DeferredExecutor` | ||
- `until.Condition` (use `webdriver.Condition`) | ||
- `until.WebElementCondition` (use `webdriver.WebElementCondition`) | ||
- `webdriver.UnhandledAlertError` (use `error.UnexpectedAlertOpenError`) | ||
* Removed deprecated functions: | ||
- `Deferred#cancel()` | ||
- `Deferred#catch()` | ||
- `Deferred#finally()` | ||
- `Deferred#isPending()` | ||
- `Deferred#then()` | ||
- `Promise#thenCatch()` | ||
- `Promise#thenFinally()` | ||
- `WebDriver#isElementPresent()` | ||
- `WebElement#getInnerHtml()` | ||
- `WebElement#getOuterHtml()` | ||
- `WebElement#getRawId()` | ||
- `WebElement#isElementPresent()` | ||
- `Deferred#cancel()` | ||
- `Deferred#catch()` | ||
- `Deferred#finally()` | ||
- `Deferred#isPending()` | ||
- `Deferred#then()` | ||
- `Promise#thenCatch()` | ||
- `Promise#thenFinally()` | ||
- `WebDriver#isElementPresent()` | ||
- `WebElement#getInnerHtml()` | ||
- `WebElement#getOuterHtml()` | ||
- `WebElement#getRawId()` | ||
- `WebElement#isElementPresent()` | ||
* Removed deprecated properties: | ||
- `WebDriverError#code` | ||
- `WebDriverError#code` | ||
@@ -648,4 +643,3 @@ ## v2.53.2 | ||
environment variable. | ||
* Moved all logic for parsing and interpreting responses from the remote end into the | ||
individual `command.Executor` implementations. | ||
* Moved all logic for parsing and interpreting responses from the remote end into the individual `command.Executor` implementations. | ||
* For consistency with the other Selenium language bindings, | ||
@@ -672,4 +666,3 @@ `WebDriver#isElementPresent()` and `WebElement#isElementPresent()` have been deprecated. These | ||
* FIXED: `phantomjs.Driver` now takes a third argument that defines the path to a log file to use | ||
for the phantomjs executable's output. This may be quickly set at runtime with | ||
the `SELENIUM_PHANTOMJS_LOG` environment variable. | ||
for the phantomjs executable's output. This may be quickly set at runtime with the `SELENIUM_PHANTOMJS_LOG` environment variable. | ||
@@ -712,6 +705,4 @@ ### Changes for W3C WebDriver Spec Compliance | ||
`lib/command.DeferredExecutor`. | ||
* API documentation is no longer distributed with the npm package, but remains available | ||
at <http://seleniumhq.github.io/selenium/docs/api/javascript/> | ||
* Rewrote the `error` module to export an Error subtype for each type of error defined in | ||
the [W3C WebDriver spec](https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors). | ||
* API documentation is no longer distributed with the npm package, but remains available at <http://seleniumhq.github.io/selenium/docs/api/javascript/> | ||
* Rewrote the `error` module to export an Error subtype for each type of error defined in the [W3C WebDriver spec](https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors). | ||
* Changed the `http.Request` and `http.Response` classes to store headers in maps instead of object | ||
@@ -729,4 +720,3 @@ literals. | ||
* Updated the `By` locators that are not in the W3C spec to delegated to using CSS | ||
selectors: `By.className`, `By.id`, `By.name`, and `By.tagName`. | ||
* Updated the `By` locators that are not in the W3C spec to delegated to using CSS selectors: `By.className`, `By.id`, `By.name`, and `By.tagName`. | ||
@@ -755,4 +745,3 @@ ## v2.49-51 | ||
* FIXED: the `webdriver.promise.ControlFlow` now has a consistent execution order for | ||
tasks/callbacks scheduled in different turns of the JS event loop. Refer to | ||
the `webdriver.promise` documentation for more details. | ||
tasks/callbacks scheduled in different turns of the JS event loop. Refer to the `webdriver.promise` documentation for more details. | ||
* FIXED: do not drop user auth from the WebDriver server URL. | ||
@@ -787,3 +776,3 @@ * FIXED: a single `firefox.Binary` instance may be used to configure and launch multiple | ||
* Add support for [Node v4.0.0](https://nodejs.org/en/blog/release/v4.0.0/) | ||
* Updated `ws` dependency from `0.7.1` to `0.8.0` | ||
* Updated `ws` dependency from `0.7.1` to `0.8.0` | ||
* Bumped the minimum supported version of Node from `0.10.x` to `0.12.x`. This is in accordance with | ||
@@ -805,10 +794,10 @@ the Node support policy established in `v2.45.0`. | ||
* Removed deprecated functions: | ||
* Capabilities#toJSON() | ||
* UnhandledAlertError#getAlert() | ||
* chrome.createDriver() | ||
* phantomjs.createDriver() | ||
* promise.ControlFlow#annotateError() | ||
* promise.ControlFlow#await() | ||
* promise.ControlFlow#clearHistory() | ||
* promise.ControlFlow#getHistory() | ||
* Capabilities#toJSON() | ||
* UnhandledAlertError#getAlert() | ||
* chrome.createDriver() | ||
* phantomjs.createDriver() | ||
* promise.ControlFlow#annotateError() | ||
* promise.ControlFlow#await() | ||
* promise.ControlFlow#clearHistory() | ||
* promise.ControlFlow#getHistory() | ||
* Removed deprecated enum values: `ErrorCode.NO_MODAL_DIALOG_OPEN` and | ||
@@ -837,4 +826,3 @@ `ErrorCode.MODAL_DIALOG_OPENED`. Use `ErrorCode.NO_SUCH_ALERT` and | ||
* FIXED: 8496: Extended the `chrome.Options` API to cover all configuration options (e.g. mobile | ||
emulation and performance logging) documented on the | ||
ChromeDriver [project site](https://chromedriver.chromium.org/capabilities). | ||
emulation and performance logging) documented on the ChromeDriver [project site](https://chromedriver.chromium.org/capabilities). | ||
@@ -914,4 +902,3 @@ ## v2.45.0 | ||
* FIXED: 8306: Stack overflow in promise callbacks eliminated. | ||
* FIXED: 8221: Added support for defining custom command mappings. Includes support for | ||
PhantomJS's `executePhantomJS` (requires PhantomJS 1.9.7 or GhostDriver 1.1.0). | ||
* FIXED: 8221: Added support for defining custom command mappings. Includes support for PhantomJS's `executePhantomJS` (requires PhantomJS 1.9.7 or GhostDriver 1.1.0). | ||
* FIXED: 8128: When the FirefoxDriver marshals an object to the page for | ||
@@ -1119,10 +1106,10 @@ `executeScript`, it defines additional properties (required by the driver's implementation). These | ||
* Removed deprecated functions originally scheduled for removal in 2.31.0 | ||
* promise.Application.getInstance() | ||
* promise.ControlFlow#schedule() | ||
* promise.ControlFlow#scheduleTimeout() | ||
* promise.ControlFlow#scheduleWait() | ||
* promise.Application.getInstance() | ||
* promise.ControlFlow#schedule() | ||
* promise.ControlFlow#scheduleTimeout() | ||
* promise.ControlFlow#scheduleWait() | ||
* Renamed some functions for consistency with Promises/A+ terminology. The original functions have | ||
been deprecated and will be removed in 2.34.0: | ||
* promise.resolved() -> promise.fulfilled() | ||
* promise.Deferred#resolve() -> promise.Deferred#fulfill() | ||
* promise.resolved() -> promise.fulfilled() | ||
* promise.Deferred#resolve() -> promise.Deferred#fulfill() | ||
* FIXED: remote.SeleniumServer#stop now shuts down within the active control flow, allowing scripts | ||
@@ -1129,0 +1116,0 @@ to finish. Use #kill to shutdown immediately. |
46
index.js
@@ -41,3 +41,2 @@ // Licensed to the Software Freedom Conservancy (SFC) under one | ||
const webdriver = require('./lib/webdriver') | ||
const opera = require('./opera') | ||
@@ -236,8 +235,2 @@ const Browser = capabilities.Browser | ||
this.agent_ = null | ||
/** @private {opera.Options} */ | ||
this.operaOptions_ = null | ||
/** @private {remote.DriverService.Builder} */ | ||
this.operaService_ = null | ||
} | ||
@@ -438,16 +431,2 @@ | ||
/** | ||
* Sets Opera specific {@linkplain opera.Options options} for drivers | ||
* created by this builder. Any logging or proxy settings defined on the given | ||
* options will take precedence over those set through | ||
* {@link #setLoggingPrefs} and {@link #setProxy}, respectively. | ||
* | ||
* @param {!opera.Options} options The OperaDriver options to use. | ||
* @return {!Builder} A self reference. | ||
*/ | ||
setOperaOptions(options) { | ||
this.operaOptions_ = options | ||
return this | ||
} | ||
/** | ||
* @return {chrome.Options} the Chrome specific options currently configured | ||
@@ -567,17 +546,2 @@ * for this builder. | ||
/** | ||
* Sets the {@link opera.ServiceBuilder} to use to manage the | ||
* operaDriver child process when creating sessions locally. | ||
* | ||
* @param {opera.ServiceBuilder} service the service to use. | ||
* @return {!Builder} a self reference. | ||
*/ | ||
setOperaService(service) { | ||
if (service && !(service instanceof opera.ServiceBuilder)) { | ||
throw TypeError('not a opera.ServiceBuilder object') | ||
} | ||
this.operaService_ = service | ||
return this | ||
} | ||
/** | ||
* Sets Safari specific {@linkplain safari.Options options} for drivers | ||
@@ -655,4 +619,2 @@ * created by this builder. Any logging settings defined on the given options | ||
capabilities.merge(this.edgeOptions_) | ||
} else if (browser === Browser.OPERA && this.operaOptions_) { | ||
capabilities.merge(this.operaOptions_) | ||
} | ||
@@ -744,10 +706,2 @@ | ||
case Browser.OPERA: { | ||
let service = null | ||
if (this.operaService_) { | ||
service = this.operaService_.build() | ||
} | ||
return createDriver(opera.Driver, capabilities, service) | ||
} | ||
case Browser.SAFARI: | ||
@@ -754,0 +708,0 @@ return createDriver(safari.Driver, capabilities) |
@@ -37,3 +37,2 @@ // Licensed to the Software Freedom Conservancy (SFC) under one | ||
SAFARI: 'safari', | ||
OPERA: 'opera', | ||
} | ||
@@ -287,9 +286,2 @@ | ||
/** | ||
* @return {!Capabilities} A basic set of capabilities for Opera | ||
*/ | ||
static opera() { | ||
return new Capabilities().setBrowserName(Browser.OPERA) | ||
} | ||
/** | ||
* @return {!Object<string, ?>} The JSON representation of this instance. | ||
@@ -296,0 +288,0 @@ * Note, the returned object may contain nested promised values. |
@@ -51,3 +51,3 @@ // Licensed to the Software Freedom Conservancy (SFC) under one | ||
for (let ipAddress of interfaces[key]) { | ||
if (ipAddress.family === family && ipAddress.internal === loopback) { | ||
if ((ipAddress.family === family || `IPv${ipAddress.family}` === family) && ipAddress.internal === loopback) { | ||
return ipAddress.address | ||
@@ -54,0 +54,0 @@ } |
{ | ||
"name": "selenium-webdriver", | ||
"version": "4.1.2", | ||
"version": "4.2.0", | ||
"description": "The official WebDriver JavaScript bindings from the Selenium project", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -42,3 +42,2 @@ // Licensed to the Software Freedom Conservancy (SFC) under one | ||
const safari = require('../safari') | ||
const opera = require('../opera') | ||
const { Browser, Capabilities } = require('../lib/capabilities') | ||
@@ -51,3 +50,3 @@ const { Builder } = require('../index') | ||
*/ | ||
function TargetBrowser() {} | ||
function TargetBrowser() { } | ||
@@ -128,3 +127,2 @@ /** | ||
[safari.locateSynchronously, Browser.SAFARI], | ||
[opera.locateSynchronously, Browser.OPERA], | ||
] | ||
@@ -216,3 +214,3 @@ | ||
'Ambiguous test configuration: both SELENIUM_REMOTE_URL' + | ||
' && SELENIUM_SERVER_JAR environment variables are set' | ||
' && SELENIUM_SERVER_JAR environment variables are set' | ||
) | ||
@@ -225,4 +223,4 @@ } | ||
'Ambiguous test configuration: when either the SELENIUM_REMOTE_URL or' + | ||
' SELENIUM_SERVER_JAR environment variable is set, the' + | ||
' SELENIUM_BROWSER variable must also be set.' | ||
' SELENIUM_SERVER_JAR environment variable is set, the' + | ||
' SELENIUM_BROWSER variable must also be set.' | ||
) | ||
@@ -305,3 +303,3 @@ } | ||
if(browser.name === 'firefox') { | ||
if (browser.name === 'firefox') { | ||
builder.setCapability('moz:debuggerAddress', true); | ||
@@ -326,3 +324,3 @@ } | ||
*/ | ||
function SuiteOptions() {} | ||
function SuiteOptions() { } | ||
@@ -502,4 +500,4 @@ /** | ||
`Expected global.${name} to be a function, but is ${type}.` + | ||
' This can happen if you try using this module when running with' + | ||
' node directly instead of using jasmine or mocha' | ||
' This can happen if you try using this module when running with' + | ||
' node directly instead of using jasmine or mocha' | ||
) | ||
@@ -506,0 +504,0 @@ } |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
678264
48
14581