Skip to content

Commit

Permalink
fix(cli): pass chromedriver-path arg to webdriver (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zidious committed Jan 10, 2022
1 parent b32603a commit 14e5125
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
14 changes: 14 additions & 0 deletions packages/cli/src/bin/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,18 @@ describe('cli', () => {
}
});
});

describe('--chromedriver-path', () => {
it('should throw error if path does not exist', async () => {
const result = await runCLI(
`file://${SIMPLE_HTML_FILE}`,
'--chromedriver-path="someinvalidpath"',
'--show-errors'
);
assert.include(
result.stderr,
'The specified executable path does not exist'
);
});
});
});
6 changes: 3 additions & 3 deletions packages/cli/src/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ const cli = async (
chromeOptions,
verbose,
timeout,
path,
include,
exclude,
tags,
rules,
disable,
loadDelay
loadDelay,
chromedriverPath
} = args;

const silentMode = !!stdout;
Expand Down Expand Up @@ -66,7 +66,7 @@ const cli = async (
browser: args.browser,
timeout,
chromeOptions,
path
chromedriverPath
};

args.driver = startDriver(driverConfigs);
Expand Down

0 comments on commit 14e5125

Please sign in to comment.