diff --git a/lib/runner/cli/cli.js b/lib/runner/cli/cli.js index cf0df4a303..20c05226df 100644 --- a/lib/runner/cli/cli.js +++ b/lib/runner/cli/cli.js @@ -93,6 +93,16 @@ class CliRunner { argv._source = [argv._source]; } + if (argv.firefox) { + argv.e = argv.env = 'firefox'; + } else if (argv.chrome) { + argv.e = argv.env = 'chrome'; + } else if (argv.safari) { + argv.e = argv.env = 'safari'; + } else if (argv.edge) { + argv.e = argv.env = 'edge'; + } + this.argv = argv; this.testRunner = null; diff --git a/lib/testsuite/index.js b/lib/testsuite/index.js index 1ac1ef6bc1..985b104eef 100644 --- a/lib/testsuite/index.js +++ b/lib/testsuite/index.js @@ -348,14 +348,14 @@ class TestSuite { Object.defineProperty(globalExpect, 'cookie', { value: function(...args) { - return this.expect.cookie(...args); + return global.browser.expect.cookie(...args); }, writable: false }); Object.defineProperty(globalExpect, 'url', { value: function(...args) { - return this.expect.url(...args); + return global.browser.expect.url(...args); }, writable: false });