Skip to content

Commit 2850703

Browse files
committed
[JS] Sets correct browserName when set via SELENIUM_BROWSER fixes #10218
1 parent 3f05646 commit 2850703

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • javascript/node/selenium-webdriver/testing

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function warn(msg) {
8989
* Extracts the browsers for a test suite to target from the `SELENIUM_BROWSER`
9090
* environment variable.
9191
*
92-
* @return {!Array<!TargetBrowser>} the browsers to target.
92+
* @return {{name: string, version: string, platform: string}[]} the browsers to target.
9393
*/
9494
function getBrowsersToTestFromEnv() {
9595
let browsers = process.env['SELENIUM_BROWSER']
@@ -272,7 +272,7 @@ class Environment {
272272
* @return {function(): boolean} a new predicate function.
273273
*/
274274
browsers(...browsersToIgnore) {
275-
return () => browsersToIgnore.indexOf(this.browser.name) != -1
275+
return () => browsersToIgnore.indexOf(this.browser.name) !== -1
276276
}
277277

278278
/**
@@ -288,7 +288,7 @@ class Environment {
288288

289289
const realBuild = builder.build
290290
builder.build = function () {
291-
builder.withCapabilities(Capabilities[browser.name].apply(Capabilities))
291+
builder.forBrowser(browser.name, browser.version, browser.platform);
292292

293293
if (browser.capabilities) {
294294
builder.getCapabilities().merge(browser.capabilities)

0 commit comments

Comments
 (0)