Skip to content

Commit

Permalink
fix(selenium): fix verbose mode with await (#10)
Browse files Browse the repository at this point in the history
- the types didn't update between driver var assignments
- added -v to the jquery tests to the path is hit
  • Loading branch information
timmywil authored Feb 18, 2025
1 parent 71837b0 commit 75b37c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jquery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:

- name: Run jQuery tests
working-directory: test/jquery
run: npm install && npm run test:browser
run: npm install && npm run test:browser -- -v
6 changes: 2 additions & 4 deletions selenium/createDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ export default async function createDriver( { browserName, headless, url, verbos
capabilities.setLoggingPrefs( prefs );
}

let driver = new Builder().withCapabilities( capabilities );

const chromeOptions = new Chrome.Options();
chromeOptions.addArguments( "--enable-chrome-browser-cloud-management" );

Expand Down Expand Up @@ -73,15 +71,15 @@ export default async function createDriver( { browserName, headless, url, verbos
}
}

driver = await driver
const driver = new Builder().withCapabilities( capabilities )
.setChromeOptions( chromeOptions )
.setFirefoxOptions( firefoxOptions )
.setEdgeOptions( edgeOptions )
.setIeOptions( ieOptions )
.build();

if ( verbose ) {
const driverCapabilities = driver.getCapabilities();
const driverCapabilities = await driver.getCapabilities();
const name = driverCapabilities.getBrowserName();
const version = driverCapabilities.getBrowserVersion();
console.log( `\nDriver created for ${ name } ${ version }` );
Expand Down

0 comments on commit 75b37c4

Please sign in to comment.