protractor
Advanced tools
Comparing version
@@ -720,3 +720,3 @@ "use strict"; | ||
logger.error(`Could not find Angular on page ${destination} : ${message}`); | ||
throw new Error(`Angular could not be found on the page ${destination}.` + | ||
throw new Error(`Angular could not be found on the page ${destination}. ` + | ||
`If this is not an Angular application, you may need to turn off waiting for Angular. | ||
@@ -723,0 +723,0 @@ Please see |
@@ -50,2 +50,6 @@ "use strict"; | ||
'browserstackKey', | ||
'kobitonUser', | ||
'kobitonKey', | ||
'testobjectUser', | ||
'testobjectKey', | ||
'directConnect', | ||
@@ -52,0 +56,0 @@ 'firefoxPath', |
@@ -156,3 +156,3 @@ /** | ||
.notifyWhenNoOutstandingRequests(callback); | ||
} else if (!!rootSelector) { | ||
} else if (!rootSelector) { | ||
throw new Error( | ||
@@ -182,3 +182,4 @@ 'Could not automatically find injector on page: "' + | ||
if (testability) { | ||
return testability.whenStable(function() { testCallback(); }); | ||
testability.whenStable(testCallback); | ||
return; | ||
} | ||
@@ -196,3 +197,4 @@ } | ||
if (count === 0) { | ||
return testCallback(); | ||
testCallback(); | ||
return; | ||
} | ||
@@ -702,3 +704,3 @@ | ||
elementText.indexOf(searchText) > -1; | ||
if (elementMatches) { | ||
@@ -705,0 +707,0 @@ matches.push(element); |
@@ -131,2 +131,26 @@ import { PluginConfig } from './plugins'; | ||
/** | ||
* If testobjectUser and testobjectKey are specified, kobitonUser, kobitonKey, browserstackUser, | ||
* browserStackKey and seleniumServerJar will be ignored. The tests will be run remotely using | ||
* TestObject. | ||
*/ | ||
testobjectUser?: string; | ||
/** | ||
* If testobjectUser and testobjectKey are specified, kobitonUser, kobitonKey, browserStackUser, | ||
* browserStackKey and seleniumServerJar will be ignored. The tests will be run remotely using | ||
* TestObject. | ||
*/ | ||
testobjectKey?: string; | ||
/** | ||
* If kobitonUser and kobitonKey are specified, testobjectUser, testojbectKey, browserstackUser, | ||
* browserStackKey and seleniumServerJar will be ignored. The tests will be run remotely using | ||
* TestObject. | ||
*/ | ||
kobitonUser?: string; | ||
/** | ||
* If kobitonUser and kobitonKey are specified, testobjectUser, testojbectKey, browserStackUser, | ||
* browserStackKey and seleniumServerJar will be ignored. The tests will be run remotely using | ||
* TestObject. | ||
*/ | ||
kobitonKey?: string; | ||
/** | ||
* If browserstackUser and browserstackKey are specified, seleniumServerJar | ||
@@ -133,0 +157,0 @@ * will be ignored. The tests will be run remotely using BrowserStack. |
@@ -15,2 +15,9 @@ "use strict"; | ||
} | ||
// CoffeeScript lost the hyphen in the module name a long time ago, all new version are named this: | ||
try { | ||
require('coffeescript').register(); | ||
} | ||
catch (e) { | ||
// Intentionally blank - ignore if coffeescript is not available. | ||
} | ||
// LiveScript is required here to enable config files written in LiveScript. | ||
@@ -17,0 +24,0 @@ try { |
@@ -81,11 +81,20 @@ "use strict"; | ||
let geckoDriverFile; | ||
try { | ||
let updateJson = path.resolve(SeleniumConfig.getSeleniumDir(), 'update-config.json'); | ||
let updateConfig = JSON.parse(fs.readFileSync(updateJson).toString()); | ||
geckoDriverFile = updateConfig.gecko.last; | ||
if (this.config_.geckoDriver) { | ||
geckoDriverFile = this.config_.geckoDriver; | ||
} | ||
catch (e) { | ||
throw new exitCodes_1.BrowserError(logger, 'Could not find update-config.json. ' + | ||
'Run \'webdriver-manager update\' to download binaries.'); | ||
else { | ||
try { | ||
let updateJson = path.resolve(SeleniumConfig.getSeleniumDir(), 'update-config.json'); | ||
let updateConfig = JSON.parse(fs.readFileSync(updateJson).toString()); | ||
geckoDriverFile = updateConfig.gecko.last; | ||
} | ||
catch (e) { | ||
throw new exitCodes_1.BrowserError(logger, 'Could not find update-config.json. ' + | ||
'Run \'webdriver-manager update\' to download binaries.'); | ||
} | ||
} | ||
if (!fs.existsSync(geckoDriverFile)) { | ||
throw new exitCodes_1.BrowserError(logger, 'Could not find geckodriver at ' + geckoDriverFile + | ||
'. Run \'webdriver-manager update\' to download binaries.'); | ||
} | ||
// TODO (mgiambalvo): Turn this into an import when the selenium typings are updated. | ||
@@ -92,0 +101,0 @@ const FirefoxServiceBuilder = require('selenium-webdriver/firefox').ServiceBuilder; |
@@ -9,2 +9,4 @@ export * from './attachSession'; | ||
export * from './sauce'; | ||
export * from './testObject'; | ||
export * from './kobiton'; | ||
import { DriverProvider } from './driverProvider'; | ||
@@ -11,0 +13,0 @@ import { Config } from '../config'; |
@@ -14,2 +14,4 @@ "use strict"; | ||
__export(require("./sauce")); | ||
__export(require("./testObject")); | ||
__export(require("./kobiton")); | ||
const attachSession_1 = require("./attachSession"); | ||
@@ -22,2 +24,4 @@ const browserStack_1 = require("./browserStack"); | ||
const sauce_1 = require("./sauce"); | ||
const testObject_1 = require("./testObject"); | ||
const kobiton_1 = require("./kobiton"); | ||
const logger_1 = require("../logger"); | ||
@@ -41,2 +45,10 @@ let logger = new logger_1.Logger('driverProviders'); | ||
} | ||
else if (config.testobjectUser && config.testobjectKey) { | ||
driverProvider = new testObject_1.TestObject(config); | ||
exports.logWarnings('testObject', config); | ||
} | ||
else if (config.kobitonUser && config.kobitonKey) { | ||
driverProvider = new kobiton_1.Kobiton(config); | ||
exports.logWarnings('kobiton', config); | ||
} | ||
else if (config.browserstackUser && config.browserstackKey) { | ||
@@ -77,2 +89,14 @@ driverProvider = new browserStack_1.BrowserStack(config); | ||
} | ||
if ('testObject' !== providerType && config.testObjectUser) { | ||
warnList.push('testobjectUser'); | ||
} | ||
if ('testObject' !== providerType && config.testObjectKey) { | ||
warnList.push('testobjectKey'); | ||
} | ||
if ('kobitonUser' !== providerType && config.kobitonUser) { | ||
warnList.push('kobitonUser'); | ||
} | ||
if ('kobitonKey' !== providerType && config.kobitonKey) { | ||
warnList.push('kobitonKey'); | ||
} | ||
if ('browserStack' !== providerType && config.browserstackUser) { | ||
@@ -79,0 +103,0 @@ warnList.push('browserstackUser'); |
@@ -165,4 +165,4 @@ import { By, promise as wdpromise, WebElement, WebElementPromise } from 'selenium-webdriver'; | ||
/** | ||
* Get an element within the ElementArrayFinder by index. The index starts at | ||
* 0\. Negative indices are wrapped (i.e. -i means ith element from last) | ||
* Get an element within the ElementArrayFinder by index. The index starts at 0. | ||
* Negative indices are wrapped (i.e. -i means ith element from last) | ||
* This does not actually retrieve the underlying element. | ||
@@ -169,0 +169,0 @@ * |
@@ -241,4 +241,4 @@ "use strict"; | ||
/** | ||
* Get an element within the ElementArrayFinder by index. The index starts at | ||
* 0\. Negative indices are wrapped (i.e. -i means ith element from last) | ||
* Get an element within the ElementArrayFinder by index. The index starts at 0. | ||
* Negative indices are wrapped (i.e. -i means ith element from last) | ||
* This does not actually retrieve the underlying element. | ||
@@ -245,0 +245,0 @@ * |
@@ -21,3 +21,3 @@ { | ||
"glob": "^7.0.3", | ||
"jasmine": "^2.5.3", | ||
"jasmine": "2.8.0", | ||
"jasminewd2": "^2.1.0", | ||
@@ -47,3 +47,3 @@ "optimist": "~0.6.0", | ||
"gulp": "^3.9.1", | ||
"gulp-clang-format": "^1.0.23", | ||
"gulp-clang-format": "1.0.23", | ||
"gulp-tslint": "^7.0.1", | ||
@@ -86,3 +86,3 @@ "jshint": "^2.9.2", | ||
}, | ||
"version": "5.2.2" | ||
"version": "5.3.0" | ||
} |
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
705256
1.31%108
3.85%13510
1.21%+ Added
+ Added
- Removed
- Removed
Updated