-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[java] use --enable-chrome-logs to redirect browser I/O streams
#16255
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
|
Looks like this causes some test failures :( |
Only on windows |
|
@Delta456 any idea what the Windows failures are about? Are you able to reproduce locally? I just updated this branch to see if it still happens. |
I haven't got the time to debug the issue on Windows. Feel free to try on Windows. |
asolntsev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Delta456 Do I correctly understand that argument --enable-chrome-logs enables debug logs in Chrome?
Do we really want to enable them always? Is it the good default?
It seems reasonable to me that debug logs should be disabled by default. And every user can enable them when they need.
It enables chromedriver to capture standard error logging from Chrome. It doesn't change the log level. Without it, Chrome writes to its own stderr stream that can't be captured by chromedriver or selenium. We add this argument by default in other bindings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diemol I think we should merge it because this argument is already added by default in all other bindings except Java.
User description
🔗 Related Issues
💥 What does this PR do?
Implements #16201 for Java binding
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Add
--enable-chrome-logsflag to ChromeDriverService argumentsUpdate test cases to verify the new flag inclusion
Redirect browser I/O streams for better log management
Diagram Walkthrough
File Walkthrough
ChromeDriverService.java
Add enable-chrome-logs flag to driver argumentsjava/src/org/openqa/selenium/chrome/ChromeDriverService.java
--enable-chrome-logsargument to the createArgs() methodbrowser I/O streams
ChromeDriverServiceTest.java
Update tests for new chrome-logs flagjava/test/org/openqa/selenium/chrome/ChromeDriverServiceTest.java
--enable-chrome-logsin expectedargument lists