-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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]: Not able to open the devtools session twice in ruby selenium #14350
Comments
@Mohanram3012, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
The ruby version for the above issue is ruby 3.2.2 |
I suspect that calling close closes the underlying websocket and hence the error. We added a check in Java, to open the websocket again if it is closed when a devtools session is created again for the same driver. Maybe that needs to be added to Ruby. Though, we are focusing to transitioning to W3C BiDi implementation, so not sure if it is the best use of resources to add this bit. |
@p0deje @titusfortner What do you think? |
You should not really close the connection manually. This is concerning to me:
Can you elaborate on the issue? As long as you properly use |
HI @p0deje yeah the continue call is allowing the next line of code to execute and the request and responses are captured but we don't have any way to reopen the connection or reuse the driver.intercept . For a single driver instance we are not able to intercept twice . our assumption here is we need to capture and validate the request and upon continuing we need to capture and validate the response . This gets a hit when we use driver.intercept twice or using it after closing the devtools session again |
@Mohanram3012 I see what you are saying. The thing with |
What happened?
The dev tools session is opened and i'm using it for intercepting the network request and response . I'm using ruby selenium for the above . After intercepting the driver is stuck since we are capturing the request and responses. To get the value of the intercepted request we need to close the dev tools session . We tried several ways and finally
driver.devtools.close
is closing the session and i'm able to move further . But with the same driver instance when i try to reopen the dev tools session i'm getting IO connection closed error . Need to reopen the dev tools sessionHow can we reproduce the issue?
Relevant log output
IOError: closed stream from /Users/mok/.rvm/gems/ruby-3.2.2@rubyupgrade/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/common/websocket_connection.rb:61:in `write'
Operating System
Macos
Selenium version
Selenium 4.10 seleniumdevtools 0.126
What are the browser(s) and version(s) where you see this issue?
Chrome 126
What are the browser driver(s) and version(s) where you see this issue?
chromedriver 126.0
Are you using Selenium Grid?
No
The text was updated successfully, but these errors were encountered: