Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[🐛 Bug]: CDP session is creating new window rather than using same window #15331

Open
jacob25paul opened this issue Feb 25, 2025 · 1 comment

Comments

@jacob25paul
Copy link

What happened?

Background
I need to click on edge extension menu which is outside of DOM and open particular extension along with a web page. Able to do this locally using selenium action class. But failed on selenium grid

Description
So we are trying the same via CDP in selenium grid. We already have edge profile switching works in order to get the extension. These are the steps which I am trying to do. But devtools opens in seperate window everytime we start the session

  1. Open edge window with required profile where the extension is available
  2. Open the required web page
  3. Open edge extension by clicking from extension menu
  4. test extension

How can we reproduce the issue?

1. Open edge window with required profile where the extension is available
2. Open the required web page
3. Open edge extension by clicking from extension menu
4. test extension

Relevant log output

Sample code

public void cLickOnExtension() throws AWTException, InterruptedException, IOException {
WebDriver driver = new RemoteWebDriver(new URL( spec "gridURL"),setEdge0ptions());
driver = new Augmenter(.augment(driver);
driver.get ("chrome-extension://extensionID/sidepanel.html);
DevTools devTools = ((EdgeDriver) driver).getDevTools():
devTools. createSession:
devTools. send (Page.navigate url: "edge://extensions/".
referrer. Optional. empty, transitionType: Optional.empty), frameld: Optional. empty, referrerPolicy: Optional.empty));
devTools. send (Log.enable): devTools. getCdpSession);
devTools. send (Browser-setWindowBounds(new WindowID(1), new BoundsC
Optional. of (20), Optional.of(20), Optional. of(20),
Optional. of(20),
Optional. of(WindowState.NORMALDDDD;
System.out.println(*##opened extension menu");
Thread. sleep ( millis: 3000):
driver quit:

Operating System

Windows 10

Selenium version

Java 17

What are the browser(s) and version(s) where you see this issue?

Edge 131

What are the browser driver(s) and version(s) where you see this issue?

Edge 131

Are you using Selenium Grid?

Selenium 4.20.0

Copy link

@jacob25paul, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

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!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant