Download browser at start of test

This commit is contained in:
Daniel Imms
2020-02-15 05:47:42 -08:00
parent 03c6b0c688
commit 47dc137de0
4 changed files with 27 additions and 9 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ export async function getBrowserType(): Promise<playwright.BrowserType> {
let browserType: playwright.BrowserType = playwright['chromium'];
const index = process.argv.indexOf('--browser');
if (index !== -1 && process.argv.length > index + 2 && typeof process.argv[index + 1] === 'string') {
if (index !== -1 && process.argv.length > index + 1 && typeof process.argv[index + 1] === 'string') {
const string = process.argv[index + 1];
if (string === 'firefox' || string === 'webkit') {
browserType = playwright[string];