Open Mohanram3012 opened 1 month ago
@Mohanram3012, thank you for creating this issue. We will troubleshoot it as soon as we can.
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!
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:
After intercepting the driver is stuck since we are capturing the request and responses
Can you elaborate on the issue? As long as you properly use continue.call(...)
the driver should not stuck and you should be able to inspect the request/response accordingly.
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 intercept
is that it won't work with 2 calls - you have to call it only once, otherwise, all sorts of weird issues like that can happen. Is there any specific reason why you need to call it twice and cannot consolidate these 2 calls within a single one?
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
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