Skip to content

Commit 9f51796

Browse files
committed
[js] Remove a bunch of deprecated stuff
1 parent 85abf9d commit 9f51796

24 files changed

+71
-586
lines changed

javascript/node/selenium-webdriver/CHANGES.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## v2.54.0-dev
1+
## v3.0.0-dev
22

33
* Allow users to set the agent used for HTTP connections through
44
`builder.Builder#usingHttpAgent()`
@@ -9,8 +9,25 @@
99
* Internal cleanup replacing uses of managed promises with native promises
1010
* Removed the mandatory use of Firefox Dev Edition, when using Marionette driver
1111
* Fixed timeouts' URL
12-
* Removed the deprecated `webdriver.UnhandledAlertError`, which was just an
13-
alias for `error.UnexpectedAlertOpenError`
12+
* Removed deprecated modules:
13+
- `selenium-webdriver/error` (use `selenium-webdriver/lib/error`,\
14+
or the `error` property exported by `selenium-webdriver`)
15+
* Removed deprecated types:
16+
- `error.InvalidSessionIdError` (use `error.NoSuchSessionError`)
17+
- `executors.DeferredExecutor` (use `command.DeferredExecutor`)
18+
- `until.Condition` (use `webdriver.Condition`)
19+
- `until.WebElementCondition` (use `webdriver.WebElementCondition`)
20+
- `webdriver.UnhandledAlertError` (use `error.UnexpectedAlertOpenError`)
21+
* Removed deprecated functions:
22+
- `Promise#thenCatch()`
23+
- `Promise#thenFinally()`
24+
- `WebDriver#isElementPresent()`
25+
- `WebElement#getInnerHtml()`
26+
- `WebElement#getOuterHtml()`
27+
- `WebElement#getRawId()`
28+
- `WebElement#isElementPresent()`
29+
* Removed deprecated properties:
30+
- `WebDriverError#code`
1431

1532

1633
## v2.53.2

javascript/node/selenium-webdriver/chrome.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ const Command = {
155155
* @return {!command.Executor} The new command executor.
156156
*/
157157
function createExecutor(url) {
158-
return new executors.DeferredExecutor(url.then(url => {
158+
return new command.DeferredExecutor(url.then(url => {
159159
let client = new http.HttpClient(url);
160160
let executor = new http.Executor(client);
161161
executor.defineCommand(

javascript/node/selenium-webdriver/edge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ class Driver extends webdriver.WebDriver {
355355

356356
/** @override */
357357
this.quit = function() {
358-
return boundQuit().thenFinally(service.kill.bind(service));
358+
return boundQuit().finally(service.kill.bind(service));
359359
};
360360
}
361361

javascript/node/selenium-webdriver/error.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

javascript/node/selenium-webdriver/executors.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ const HttpClient = require('./http').HttpClient,
3030
// PUBLIC API
3131

3232

33-
/** @deprecated Use {@link ./lib/command.DeferredExecutor} instead. */
34-
exports.DeferredExecutor = DeferredExecutor;
35-
3633
/**
3734
* Creates a command executor that uses WebDriver's JSON wire protocol.
3835
* @param {(string|!Promise<string>)} url The server's URL, or a promise that

javascript/node/selenium-webdriver/ie.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ class Driver extends webdriver.WebDriver {
423423

424424
/** @override */
425425
this.quit = function() {
426-
return boundQuit().thenFinally(service.kill.bind(service));
426+
return boundQuit().finally(service.kill.bind(service));
427427
};
428428
}
429429

javascript/node/selenium-webdriver/io/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ exports.rmDir = function(dirPath) {
6565
numAttempts += 1;
6666
rimraf(dirPath, function(err) {
6767
if (err) {
68-
if (err.code === 'ENOTEMPTY' && numAttempts < 2) {
68+
if (err.code && err.code === 'ENOTEMPTY' && numAttempts < 2) {
6969
attemptRm();
7070
return;
7171
}

javascript/node/selenium-webdriver/lib/actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class ActionSequence {
144144
if (typeof location.x === 'number') {
145145
setOffset(/** @type {{x: number, y: number}} */(location));
146146
} else {
147-
cmd.setParameter('element', location.getRawId());
147+
cmd.setParameter('element', location.getId());
148148
if (opt_offset) {
149149
setOffset(opt_offset);
150150
}

0 commit comments

Comments
 (0)