-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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]: Using CDP in multiple tabs #13300
Comments
@grayglj, 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! |
I know that you need to create a new DevTools session per tab, I just do not know how to do that in C#. @nvborisenko do you know how to do that? |
Session implementation supposed to be initialized before creating new tabs in the browser. Behind of scene it attaches some unpredictable More details about initialization: https://github.com/SeleniumHQ/selenium/blob/5b1b4490979a579716381a42f77ac5e4cf8f5e7b/dotnet/src/webdriver/DevTools/DevToolsSession.cs#L367C9-L367C9 var targets = await this.domains.Target.GetTargets().ConfigureAwait(false);
foreach (var target in targets)
{
if (target.Type == "page")
{
this.attachedTargetId = target.TargetId;
LogTrace("Found Target ID {0}.", this.attachedTargetId);
break;
}
} @EdwinVanVliet tries to improve it, especially your case (network event monitoring for different tabs #10603). |
@nvborisenko does #13330 fix this, then? |
Potentially, not 100% sure. That PR brings a possibility to "pause" newly opened tab in browser. Will see. |
@nvborisenko is there something we know we want to do here beyond what we've done for 4.17? |
The referenced PR was merged, and if something is still needed we can always reopen this issue. |
This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs. |
What happened?
Hi,To inspect network traffic, i use AttachToTarget to switch session between multiple tabs in chome, but the newly created session
always be bound with the last opened tab.
How can we reproduce the issue?
Relevant log output
Operating System
Windows 10
Selenium version
4.16.2
What are the browser(s) and version(s) where you see this issue?
Chrome 120.0.6099.71 (Official Build) (64-bit)
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 120.0.6099.71
Are you using Selenium Grid?
no
The text was updated successfully, but these errors were encountered: