Skip to content

[🐛 Bug]: {"code":-32000,"message":"Browser window not found"} when maximizing edge window via RemoteWebDriver in selenium grid #15174

Open
@tkleiber

Description

@tkleiber

What happened?

Hi!

I get mentioned error when running a test against my selenum grid:

When removing "driver.manage().window().maximize();", then the test starts.
But some of my tests needs maximized browser, as they cannot set focus on items outside the visible browser window.
By the way same error occurs with driver.manage().window().setSize.

I cannot test against other drivers, as I don't have and get one installed in our business development environment.
I have already created similar issue on EdgeWebDriver: MicrosoftEdge/EdgeWebDriver#185 for the case that this will be an driver issue.

Best regards
Torsten

How can we reproduce the issue?

Run following code against your grid with a windows 10 node:


import java.net.URI;

import org.junit.Test;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.edge.EdgeOptions;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

public class WindowsMaximizeTest {

    @Test
    public void testSelenium() throws Exception {
        DesiredCapabilities capabilities = new DesiredCapabilities();
        EdgeOptions edgeOptions = new EdgeOptions();
        edgeOptions.addArguments("--headless");
        capabilities.setCapability(EdgeOptions.CAPABILITY, edgeOptions);
        WebDriver driver = new RemoteWebDriver(URI.create("<my grid url>").toURL(), capabilities);
        driver.manage().window().maximize();
        driver.get("http://www.google.com");
        driver.quit();
    
    }

Relevant log output

org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32000,"message":"Browser window not found"}
  (Session info: MicrosoftEdge=132.0.2957.115)
Build info: version: '4.13.0', revision: 'ba948ece5b*'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_431'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [1ac9d96d43084c83f03f5fda8910f4b9, maximizeCurrentWindow {}]
Capabilities {acceptInsecureCerts: false, browserName: MicrosoftEdge, browserVersion: 132.0.2957.115, fedcm:accounts: true, ms:edgeOptions: {debuggerAddress: localhost:58446}, msedge: {msedgedriverVersion: 132.0.2957.115 (f14150e8a7c..., userDataDir: C:\WINDOWS\SystemTemp\scope...}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: Windows 10, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://10.47.170.93:4444/sess..., se:cdpVersion: 132.0.2957.115, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: 1ac9d96d43084c83f03f5fda8910f4b9
     java.lang.reflect.Constructor.newInstance(Constructor.java:423)
     org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200)
     org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133)
     org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:52)
     org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:191)
     org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:51)
     org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:602)
     org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:675)
     org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:679)
     org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:1063)
     de.ikb.adf.basis.test.WindowsMaximizeTest.testSelenium(WindowsMaximizeTest.java:27)

Operating System

Window 10 grid hub and node, Windows 10 Java IDE

Selenium version

Java 8, Selenium 4.13: at the moment we are restricted to Java 8 through the Oracle ADF development framework

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

Edge 132.0.2957.115

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

EdgeWebDriver 132.0.2957.127

Are you using Selenium Grid?

4.13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!I-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions