Skip to content
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

[🐛 Bug]: How do I enable bidi #14425

Closed
fenchu opened this issue Aug 22, 2024 · 3 comments
Closed

[🐛 Bug]: How do I enable bidi #14425

fenchu opened this issue Aug 22, 2024 · 3 comments
Labels
I-question Applied to questions. Issues should be closed and send the user to community resources.

Comments

@fenchu
Copy link

fenchu commented Aug 22, 2024

What happened?

testing out bidi on selenium v4.22.0, but how do I enable it, it refers to capabilities but that is under service.

and https://www.selenium.dev/documentation/webdriver/bidi/logging/
says: Remember that to use WebDriver BiDi, you must enable it in Options

just a placeholder?

How can we reproduce the issue?

#!/usr/bin/env python3
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.chrome.service import Service as ChromeService

options = webdriver.ChromeOptions()
options.add_argument("--incognito")
options.add_argument("--disable-search-engine-choice-screen")

# do not need the first entry in list if chromedriver is in your PATH
service = ChromeService(service_args=['C:\\dist\\webdrivers\\chromedriver.exe', "--verbose", "--log-path=./chromedriver.log"])
driver = webdriver.Chrome(service=service, options=options)
driver.get('https://www.buypass.no')
log1 = []
driver.script.add_console_message_handler(log1.append)
WebDriverWait(driver, 5).until(lambda _: log1)
for l in log1:
    print(l)


### Relevant log output

```shell
DevTools listening on ws://127.0.0.1:49190/devtools/browser/716d0c15-2324-4465-9288-57e9aa0e649d
Traceback (most recent call last):
  File "C:\dist\trk-fullstack-test\bin\chrome-console.py", line 20, in <module>
    driver.script.add_console_message_handler(log1.append)
    ^^^^^^^^^^^^^
  File "C:\dist\venvs\trk-fullstack-test\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1076, in script
    self._start_bidi()
  File "C:\dist\venvs\trk-fullstack-test\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1087, in _start_bidi
    raise WebDriverException("Unable to find url to connect to from capabilities")
selenium.common.exceptions.WebDriverException: Message: Unable to find url to connect to from capabilities



### Operating System

windows 11

### Selenium version

python 3.12.5

### What are the browser(s) and version(s) where you see this issue?

Chrome v127

### What are the browser driver(s) and version(s) where you see this issue?

ChromeDriver 127.0.6533.119

### Are you using Selenium Grid?

_No response_
Copy link

@fenchu, 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.

Thank you!

@diemol
Copy link
Member

diemol commented Aug 22, 2024

We need to improve the docs there, any help is appreciated.

For now, you can check https://www.selenium.dev/blog/2024/selenium-4-22-released/

@diemol diemol added I-question Applied to questions. Issues should be closed and send the user to community resources. and removed I-defect needs-triaging labels Aug 22, 2024
Copy link

💬 Please ask questions at:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-question Applied to questions. Issues should be closed and send the user to community resources.
Projects
None yet
Development

No branches or pull requests

2 participants