-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hi!
When I run follwing code against my selenium hub:
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();
}
}
I get following error:
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)
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.
Best regards
Torsten
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working