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
Cannot access Chrome DevTools from WebDriverManager.chromedriver().browserInDocker() #947
Comments
The method
But even that it is not going to work, since internally WebDriverManager uses the Aerokube Docker images, and currently, the support for CDP is an open issue. |
Suddenly from yesterday ChromeDriver initialization is having issue. Throwing:
Any idea why? Firefox driver is working without any issue. |
@bonigarcia Is there any update on this? When can we expect for DevTools to work with Docker? |
I don't have any news about it, sorry. The support for CDP in Aerokube's images is still an open issue. |
@bonigarcia there is an update on that ticket today: |
@bonigarcia any chance to take a look at this? |
I don't have the time to look into this, sorry. You can contribute to the project with a PR about it if you need it. |
I managed to implement a test using dockerized browsers through WebDriverManager and CDP: This will require use the host network in Docker and WebDriverManager 5.6.0, just released. Unfortunately, I managed to get this test working in local, but not in GitHub Actions. In GH Actions I get a "connection refused" when connecting to http://localhost:4444/ (see question). |
I confirmed this is also working in GH Actions. For example:
For executing in GH Actions, it is important not to run the test after Xvfb is started. For some reason, using Xvfb does not allow us to use port 4444 in the same session. In summary, the support for CDP through dockerized browsers required the use of the host Docker network, use and WebDriver augmenters, and avoid Xvfb:
|
Description of the problem:
Running chrome browser in Docker and attempting to access ChromeDriver DevTools
However casting it to the created browser throws an error
Browser and version:
ChromeDriver 107.0.5304.62
Operating system:
Linux
WebDriverManager version:
5.3.1
WebDriverManager call:
WebDriverManager wdm = WebDriverManager.chromedriver().browserInDocker();
WebDriver driver = wdm.create();
DevTools chromeDevTools = ((ChromeDriver) driver).getDevTools();
chromeDevTools.createSession();
WebDriverManager traces:
Error log:
java.lang.ClassCastException at BetTests.java:33
The text was updated successfully, but these errors were encountered: