-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] Suppress unwanted messages from browser via redirecting streams #16265
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
[dotnet] Suppress unwanted messages from browser via redirecting streams #16265
Conversation
PR Reviewer Guide 🔍
Here are some key observations to aid the review process:
🎫 Ticket compliance analysis 🔶
16201 - Partially compliant
Compliant requirements:
- Add the --enable-chrome-logs flag when starting chromedriver across non-JS bindings.
- Ensure browser i/o streams can be redirected/suppressed by inheriting them in the driver process.
Non-compliant requirements:
- Consider whether Edge (Chromium-based) needs similar handling.
Requires further human verification:
- Confirm at runtime that logs are indeed redirected/suppressed as expected across platforms (Windows, macOS, Linux).
- Validate no regressions in driver startup when --enable-chrome-logs is present with various Chrome versions.
Behavior Change
The flag is added unconditionally, which may alter existing user expectations or custom logging setups. Verify this does not break scenarios where users relied on previous stdout/err behavior or where ChromeDriver rejects unknown flags in certain versions.
// Unconditionally redirect browser logs to the same log as the driver argsBuilder.Append(" --enable-chrome-logs");
Cross-Browser Impact
ChromiumDriverService could be used for other Chromium-based browsers; confirm that --enable-chrome-logs is accepted by all targeted Chromium derivatives (e.g., Edge) or gate per browser if needed.
// Unconditionally redirect browser logs to the same log as the driver argsBuilder.Append(" --enable-chrome-logs");
PR Code Suggestions ✨Explore these optional code suggestions:
|
Uh oh!
There was an error while loading. Please reload this page.
User description
🔗 Related Issues
Contributes to #16201
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Add
--enable-chrome-logs
flag to ChromiumDriverServiceRedirect browser logs to driver process output
Suppress unwanted browser messages in console
Diagram Walkthrough
File Walkthrough
ChromiumDriverService.cs
Add browser log redirection flag
dotnet/src/webdriver/Chromium/ChromiumDriverService.cs
--enable-chrome-logs
command line argument