Skip to content

fix(selenium): fix verbose mode with await #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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