[JS] Sets correct browserName when set via SELENIUM_BROWSER fixes
@@ -89,7 +89,7 @@ function warn(msg) {
* Extracts the browsers for a test suite to target from the `SELENIUM_BROWSER`
* environment variable.
*
- * @return {!Array<!TargetBrowser>} the browsers to target.
+ * @return {{name: string, version: string, platform: string}[]} the browsers to target.
*/
function getBrowsersToTestFromEnv() {
let browsers = process.env['SELENIUM_BROWSER']
@@ -272,7 +272,7 @@ class Environment {
* @return {function(): boolean} a new predicate function.
*/
browsers(...browsersToIgnore) {
- return () => browsersToIgnore.indexOf(this.browser.name) != -1
+ return () => browsersToIgnore.indexOf(this.browser.name) !== -1
}
/**
@@ -288,7 +288,7 @@ class Environment {
const realBuild = builder.build
builder.build = function () {
- builder.withCapabilities(Capabilities[browser.name].apply(Capabilities))
+ builder.forBrowser(browser.name, browser.version, browser.platform);
if (browser.capabilities) {
builder.getCapabilities().merge(browser.capabilities)
