You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello here,
I subscribed to a console log event in BiDi with an empty callback handler. The normal behavior should be not to print anything in the terminal. However it systematically prints a JSON string with all the details normally consumed by ConsoleLogEntry.
I believe it's due to a simple development leftover of print(json).
I think this small print should be removed so that user can choose what is printed on screen.
How can we reproduce the issue?
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.service import Service
def on_console_log(log_entry):
pass
driver_service = Service(self.driver_path)
options = Options()
options.log.level = "trace"
options.enable_bidi = True
driver = webdriver.Firefox(service=driver_service, options=self.options)
driver.script.add_console_message_handler(on_console_logs)
# Do anything with a Firefox browser that output something to the console to trigger the behavior
Relevant log output
{'type': 'console', 'method': 'warn', 'source': {'realm': '54dd4a6e-8462-4dba-ba26-d64409fe689f', 'context': '47013acc-74ce-49a9-a477-f6a661b5d9a6'}, 'args': [{'type': 'string', 'value': 'using deprecated parameters for the initialization function; pass a single object instead'}], 'level': 'warn', 'text': 'using deprecated parameters for the initialization function; pass a single object instead', 'timestamp': 1728032001729}
{'type': 'console', 'method': 'warn', 'source': {'realm': '54dd4a6e-8462-4dba-ba26-d64409fe689f', 'context': '47013acc-74ce-49a9-a477-f6a661b5d9a6'}, 'args': [{'type': 'string', 'value': 'using deprecated parameters for the initialization function; pass a single object instead'}], 'level': 'warn', 'text': 'using deprecated parameters for the initialization function; pass a single object instead', 'timestamp': 1728032001786}
Operating System
Ubuntu
Selenium version
Python 4.24.0
What are the browser(s) and version(s) where you see this issue?
Firefox 131
What are the browser driver(s) and version(s) where you see this issue?
GeckoDriver 0.35.0
Are you using Selenium Grid?
No response
The text was updated successfully, but these errors were encountered:
@soonum, thank you for creating this issue. We will troubleshoot it as soon as we can.
Info for maintainers
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template label.
If the issue is a question, add the I-question label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-* label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer label.
What happened?
Hello here,
I subscribed to a console log event in BiDi with an empty callback handler. The normal behavior should be not to print anything in the terminal. However it systematically prints a JSON string with all the details normally consumed by
ConsoleLogEntry
.I believe it's due to a simple development leftover of
print(json)
.I think this small print should be removed so that user can choose what is printed on screen.
How can we reproduce the issue?
Relevant log output
Operating System
Ubuntu
Selenium version
Python 4.24.0
What are the browser(s) and version(s) where you see this issue?
Firefox 131
What are the browser driver(s) and version(s) where you see this issue?
GeckoDriver 0.35.0
Are you using Selenium Grid?
No response
The text was updated successfully, but these errors were encountered: