Skip to content

[πŸ› Bug]: CDP session is creating new window rather than using same windowΒ #15331

@jacob25paul

Description

@jacob25paul

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-defectSomething is not working as intendedJ-issue-templateApplied to issues not following the template, or missing information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions