diff --git a/lib/debugger.ts b/lib/debugger.ts index 06d1dcc54..b22cfa0dd 100644 --- a/lib/debugger.ts +++ b/lib/debugger.ts @@ -270,7 +270,7 @@ export class DebugHelper { }, (err: string) => { console.error(err); - process.exit(1); + return process.exit(1) as never; }); } diff --git a/lib/driverProviders/driverProvider.ts b/lib/driverProviders/driverProvider.ts index 225c2ee44..35a7616d4 100644 --- a/lib/driverProviders/driverProvider.ts +++ b/lib/driverProviders/driverProvider.ts @@ -57,7 +57,7 @@ export abstract class DriverProvider { if (this.config_.disableEnvironmentOverrides === true) { builder.disableEnvironmentOverrides(); } - let newDriver = builder.build(); + let newDriver = builder.build() as WebDriver; this.drivers_.push(newDriver); return newDriver; } diff --git a/lib/driverProviders/mock.ts b/lib/driverProviders/mock.ts index b7a22d7d1..c5e3a130a 100644 --- a/lib/driverProviders/mock.ts +++ b/lib/driverProviders/mock.ts @@ -5,7 +5,6 @@ */ import * as q from 'q'; import {Session, WebDriver} from 'selenium-webdriver'; -import * as executors from 'selenium-webdriver/executors'; import {Config} from '../config'; import {DriverProvider} from './driverProvider'; diff --git a/package-lock.json b/package-lock.json index 704341527..e679c2a71 100644 --- a/package-lock.json +++ b/package-lock.json @@ -71,9 +71,9 @@ "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=" }, "@types/selenium-webdriver": { - "version": "2.53.43", - "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz", - "integrity": "sha512-UBYHWph6P3tutkbXpW6XYg9ZPbTKjw/YC2hGG1/GEvWwTbvezBUv3h+mmUFw79T3RFPnmedpiXdOBbXX+4l0jg==" + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.10.tgz", + "integrity": "sha512-ikB0JHv6vCR1KYUQAzTO4gi/lXLElT4Tx+6De2pc/OZwizE9LRNiTa+U8TBFKBD/nntPnr/MPSHSnOTybjhqNA==" }, "accepts": { "version": "1.3.4", @@ -85,11 +85,6 @@ "negotiator": "0.6.1" } }, - "adm-zip": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.4.tgz", - "integrity": "sha1-ph7VrmkFw66lizplfSUDMJEFJzY=" - }, "agent-base": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz", @@ -2909,11 +2904,6 @@ } } }, - "options": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=" - }, "orchestrator": { "version": "0.3.8", "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", @@ -3891,11 +3881,6 @@ "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", "dev": true }, - "ultron": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", - "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=" - }, "unc-path-regex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", @@ -4116,52 +4101,18 @@ } }, "webdriver-js-extender": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz", - "integrity": "sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.0.0.tgz", + "integrity": "sha512-fbyKiVu3azzIc5d4+26YfuPQcFTlgFQV5yQ/0OQj4Ybkl4g1YQuIPskf5v5wqwRJhHJnPHthB6tqCjWHOKLWag==", "requires": { - "@types/selenium-webdriver": "^2.53.35", - "selenium-webdriver": "^2.53.2" + "@types/selenium-webdriver": "^3.0.0", + "selenium-webdriver": "^3.0.1" }, "dependencies": { - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "^7.0.5" - } - }, - "sax": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.6.1.tgz", - "integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=" - }, - "selenium-webdriver": { - "version": "2.53.3", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz", - "integrity": "sha1-0p/1qVff8aG0ncRXdW5OS/vc4IU=", - "requires": { - "adm-zip": "0.4.4", - "rimraf": "^2.2.8", - "tmp": "0.0.24", - "ws": "^1.0.1", - "xml2js": "0.4.4" - } - }, - "tmp": { - "version": "0.0.24", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.24.tgz", - "integrity": "sha1-1qXhmNFKmDXMby18PZ4wJCjIzxI=" - }, - "xml2js": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.4.tgz", - "integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=", - "requires": { - "sax": "0.6.x", - "xmlbuilder": ">=1.0.0" - } + "@types/selenium-webdriver": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.10.tgz", + "integrity": "sha512-ikB0JHv6vCR1KYUQAzTO4gi/lXLElT4Tx+6De2pc/OZwizE9LRNiTa+U8TBFKBD/nntPnr/MPSHSnOTybjhqNA==" } } }, @@ -4245,15 +4196,6 @@ } } }, - "ws": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", - "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", - "requires": { - "options": ">=0.0.5", - "ultron": "1.0.x" - } - }, "xdg-basedir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", diff --git a/package.json b/package.json index 889e1a617..ab738d13b 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "dependencies": { "@types/node": "^6.0.46", "@types/q": "^0.0.32", - "@types/selenium-webdriver": "~2.53.39", + "@types/selenium-webdriver": "^3.0.0", "blocking-proxy": "^1.0.0", "browserstack": "^1.5.1", "chalk": "^1.1.3", @@ -26,7 +26,7 @@ "saucelabs": "^1.5.0", "selenium-webdriver": "3.6.0", "source-map-support": "~0.4.0", - "webdriver-js-extender": "^1.0.0", + "webdriver-js-extender": "2.0.0", "webdriver-manager": "^12.0.6" }, "devDependencies": { diff --git a/scripts/errorTest.js b/scripts/errorTest.js index 8f665bc6a..7139ca40f 100644 --- a/scripts/errorTest.js +++ b/scripts/errorTest.js @@ -10,7 +10,7 @@ var checkLogs = function(output, messages) { for (var pos in messages) { var message = messages[pos]; if (output.indexOf(message) === -1) { - throw new Error('does not exist in logs: ' + message); + throw new Error('\'' + message + '\'' + ' does not exist in logs: ' + output); } } }; @@ -23,7 +23,8 @@ var checkLogs = function(output, messages) { runProtractor = spawn('node', ['bin/protractor', 'spec/errorTest/sauceLabsAuthentication.js']); output = runProtractor.stdout.toString(); -messages = ['WebDriverError: Misconfigured -- Sauce Labs Authentication Error.', + +messages = ['Sauce Labs Authentication Error.', 'Process exited with error code ' + exitCodes.BrowserError.CODE]; checkLogs(output, messages);