Skip to content

Commit 75b37c4

Browse files
authored
fix(selenium): fix verbose mode with await (#10)
- the types didn't update between driver var assignments - added -v to the jquery tests to the path is hit
1 parent 71837b0 commit 75b37c4

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.github/workflows/jquery.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737

3838
- name: Run jQuery tests
3939
working-directory: test/jquery
40-
run: npm install && npm run test:browser
40+
run: npm install && npm run test:browser -- -v

selenium/createDriver.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ export default async function createDriver( { browserName, headless, url, verbos
2121
capabilities.setLoggingPrefs( prefs );
2222
}
2323

24-
let driver = new Builder().withCapabilities( capabilities );
25-
2624
const chromeOptions = new Chrome.Options();
2725
chromeOptions.addArguments( "--enable-chrome-browser-cloud-management" );
2826

@@ -73,15 +71,15 @@ export default async function createDriver( { browserName, headless, url, verbos
7371
}
7472
}
7573

76-
driver = await driver
74+
const driver = new Builder().withCapabilities( capabilities )
7775
.setChromeOptions( chromeOptions )
7876
.setFirefoxOptions( firefoxOptions )
7977
.setEdgeOptions( edgeOptions )
8078
.setIeOptions( ieOptions )
8179
.build();
8280

8381
if ( verbose ) {
84-
const driverCapabilities = driver.getCapabilities();
82+
const driverCapabilities = await driver.getCapabilities();
8583
const name = driverCapabilities.getBrowserName();
8684
const version = driverCapabilities.getBrowserVersion();
8785
console.log( `\nDriver created for ${ name } ${ version }` );

0 commit comments

Comments
 (0)