Skip to content

Commit

Permalink
[JS] Add support for ChromeDriver --enable-chrome-logs (SeleniumHQ#…
Browse files Browse the repository at this point in the history
…9575)

The `--enable-chrome-logs` ChromeDriver option can now be enabled using
the Chromium (or Chrome) ServiceBuilder, similarly to the other options
provided by ChromeDriver.

I found this option critically useful for debugging test failures.

Co-authored-by: David Burns <david.burns@theautomatedtester.co.uk>
  • Loading branch information
Gudahtt and AutomatedTester committed Jul 16, 2021
1 parent 6c32553 commit e2866fc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions javascript/node/selenium-webdriver/chromium.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ class ServiceBuilder extends remote.DriverService.Builder {
return this.addArguments('--log-path=' + path)
}

/**
* Enables Chrome logging.
* @returns {!ServiceBuilder} A self reference.
*/
enableChromeLogging() {
return this.addArguments('--enable-chrome-logs');
}

/**
* Enables verbose logging.
* @return {!ServiceBuilder} A self reference.
Expand Down

0 comments on commit e2866fc

Please sign in to comment.