Skip to content

Commit

Permalink
Merge branch 'allow-browser-args-forward' of https://github.com/NullV…
Browse files Browse the repository at this point in the history
…oxPopuli/faltest into allow-browser-args-forward
  • Loading branch information
NullVoxPopuli committed Apr 28, 2020
2 parents 408fb45 + cf5141c commit a5d6108
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/remote/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,15 @@ function stopWebDriver(webDriver) {
});
}

async function getCapabilities({
customizeCapabilities = (browserName, capabilities) => capabilities,
overrides: {
browser: _browser = getDefaults().browser,
} = {},
}) {
async function getCapabilities(options) {
let {
browserArgs = [],
customizeCapabilities = (browserName, capabilities) => capabilities,
overrides: {
browser: _browser = getDefaults().browser,
} = {},
} = options;

let capabilities = {
browserName: _browser,
};
Expand All @@ -269,7 +272,7 @@ async function getCapabilities({

switch (_browser) {
case 'chrome': {
let args = [];
let args = [...browserArgs];
if (headless) {
args.push('--headless');
}
Expand All @@ -280,7 +283,7 @@ async function getCapabilities({
break;
}
case 'firefox': {
let args = [];
let args = [...browserArgs];
if (headless) {
args.push('-headless');
}
Expand Down

0 comments on commit a5d6108

Please sign in to comment.