[dotnet] use correct devtools session id after reinitialization#13768
Conversation
|
PR Description updated to latest commit (bacefcc)
|
PR Review
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
bacefcc to
e306d50
Compare
Fix regression issue, appeared in v4.17. Closing a tab breaks the devtools session Fixes SeleniumHQ#13755
e306d50 to
c23158c
Compare
|
CI failure is not related to the changes in this PR, merging it. Thanks @schrufygroovy for your contribution! |
|
@schrufygroovy Could you please sign the contributor license agreement via https://cla-assistant.io/SeleniumHQ/selenium?pullRequest=13768? |
done |
User description
Description
After reinitialization of the dev tools session, that new active session id should be used.
Motivation and Context
Fixes regression issue: #13755
Types of changes
PLEASE double check: in case a
sessionIdis provided toSendCommand()I removed the check ifattachedTargetId == nulland the reinitialization of the session. My assumption was in case thesessionIdis given, we don't need a session re-initialization.Checklist
Type
bug_fix, tests
Description
Changes walkthrough
DevToolsSession.cs
Improve DevTools Session Management in Selenium WebDriverdotnet/src/webdriver/DevTools/DevToolsSession.cs
SendCommandto reattach session ifattachedTargetIdis nullbefore sending a command.
SendCommand.DevToolsTabsTest.cs
Add Test for Verifying DevTools Session After Closing Tabdotnet/test/common/DevTools/DevToolsTabsTest.cs
ClosingTabDoesNotBreakDevToolsSessionto verifyDevTools session remains active after closing a tab.