-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed as not planned
Closed as not planned
Copy link
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-pyPython BindingsPython BindingsD-chromeI-defectSomething is not working as intendedSomething is not working as intendedOS-mac
Description
Description
Repro instructions: run this on 4.33.0
cdp, conn = webdriver.Chrome(service=service, options=options).start_devtools()
conn.execute(cdp.target.send_message_to_target(str(next(cdp.network.enable())), conn.session_id))
Expected: it works
Actual:
Exception: {'code': -32602, 'message': 'No session with given id'}
After adding various debug logs to selenium, chrome and chromedriver, I was able to verify the following:
- This in selenium triggers this in Chrome with this=Handler1, target_id="Target1" and out_session_id="Session1".
- But later when the Network.enable() command is issued, it arrives here with this=Handler2, target_id=std::nullopt, and session_id="Session1". Thus, failing this lookup
Possibly related: is it actually correct that start_devtools() arbitrarily attaches to the first handler returned by Target.getTargets() here? My understanding is these handlers map to different functionalities of the protocol, e.g. there is a a NetworkHandler responsible for Network.* commands.
Reproducible Code
See above
Debugging Logs
See above
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-pyPython BindingsPython BindingsD-chromeI-defectSomething is not working as intendedSomething is not working as intendedOS-mac