[py] Add --enable-chrome-logs to chrome service args to inherit browser i/o streams#16202
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
|
Marking this as a draft. It seems to break things if you launch with |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
User description
🔗 Related Issues
implements #16201 for Python
fixes #16117
fixes #13095
💥 What does this PR do?
This PR adds the
--enable-chrome-logsargument when starting chromedriver. This allows it to inherit the i/o streams from the browser process. Without this, we have no way to suppress or redirect browser i/o streams, which results in unwanted logging going to the user's console.🔧 Implementation Notes
I added this to the chrome Service class rather than the chromium Service class because I am not sure if this is also supported by Edge, or is only relevant to Chrome.
💡 Additional Considerations
We should test to make sure this doesn't screw up any other logging features.
🔄 Types of changes
PR Type
Bug fix
Description
Add
--enable-chrome-logsflag to Chrome service argumentsEnable browser I/O stream inheritance to suppress unwanted console logging
Override
command_line_args()method in Chrome service classDiagram Walkthrough
File Walkthrough
service.py
Add Chrome logs flag to service argumentspy/selenium/webdriver/chrome/service.py
command_line_args()method to include--enable-chrome-logsflag