Skip to content

Commit

Permalink
[js] Remove a bunch of deprecated stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jleyba committed Jun 9, 2016
1 parent 85abf9d commit 9f51796
Show file tree
Hide file tree
Showing 24 changed files with 71 additions and 586 deletions.
23 changes: 20 additions & 3 deletions javascript/node/selenium-webdriver/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## v2.54.0-dev
## v3.0.0-dev

* Allow users to set the agent used for HTTP connections through
`builder.Builder#usingHttpAgent()`
Expand All @@ -9,8 +9,25 @@
* Internal cleanup replacing uses of managed promises with native promises
* Removed the mandatory use of Firefox Dev Edition, when using Marionette driver
* Fixed timeouts' URL
* Removed the deprecated `webdriver.UnhandledAlertError`, which was just an
alias for `error.UnexpectedAlertOpenError`
* Removed deprecated modules:
- `selenium-webdriver/error` (use `selenium-webdriver/lib/error`,\
or the `error` property exported by `selenium-webdriver`)
* Removed deprecated types:
- `error.InvalidSessionIdError` (use `error.NoSuchSessionError`)
- `executors.DeferredExecutor` (use `command.DeferredExecutor`)
- `until.Condition` (use `webdriver.Condition`)
- `until.WebElementCondition` (use `webdriver.WebElementCondition`)
- `webdriver.UnhandledAlertError` (use `error.UnexpectedAlertOpenError`)
* Removed deprecated functions:
- `Promise#thenCatch()`
- `Promise#thenFinally()`
- `WebDriver#isElementPresent()`
- `WebElement#getInnerHtml()`
- `WebElement#getOuterHtml()`
- `WebElement#getRawId()`
- `WebElement#isElementPresent()`
* Removed deprecated properties:
- `WebDriverError#code`


## v2.53.2
Expand Down
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/chrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const Command = {
* @return {!command.Executor} The new command executor.
*/
function createExecutor(url) {
return new executors.DeferredExecutor(url.then(url => {
return new command.DeferredExecutor(url.then(url => {
let client = new http.HttpClient(url);
let executor = new http.Executor(client);
executor.defineCommand(
Expand Down
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class Driver extends webdriver.WebDriver {

/** @override */
this.quit = function() {
return boundQuit().thenFinally(service.kill.bind(service));
return boundQuit().finally(service.kill.bind(service));
};
}

Expand Down
30 changes: 0 additions & 30 deletions javascript/node/selenium-webdriver/error.js

This file was deleted.

3 changes: 0 additions & 3 deletions javascript/node/selenium-webdriver/executors.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ const HttpClient = require('./http').HttpClient,
// PUBLIC API


/** @deprecated Use {@link ./lib/command.DeferredExecutor} instead. */
exports.DeferredExecutor = DeferredExecutor;

/**
* Creates a command executor that uses WebDriver's JSON wire protocol.
* @param {(string|!Promise<string>)} url The server's URL, or a promise that
Expand Down
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/ie.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ class Driver extends webdriver.WebDriver {

/** @override */
this.quit = function() {
return boundQuit().thenFinally(service.kill.bind(service));
return boundQuit().finally(service.kill.bind(service));
};
}

Expand Down
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/io/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports.rmDir = function(dirPath) {
numAttempts += 1;
rimraf(dirPath, function(err) {
if (err) {
if (err.code === 'ENOTEMPTY' && numAttempts < 2) {
if (err.code && err.code === 'ENOTEMPTY' && numAttempts < 2) {
attemptRm();
return;
}
Expand Down
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/lib/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class ActionSequence {
if (typeof location.x === 'number') {
setOffset(/** @type {{x: number, y: number}} */(location));
} else {
cmd.setParameter('element', location.getRawId());
cmd.setParameter('element', location.getId());
if (opt_offset) {
setOffset(opt_offset);
}
Expand Down
Loading

0 comments on commit 9f51796

Please sign in to comment.