Unable to connect to Root Desktop session
See original GitHub issueI’m trying to connect to Desktop Session using this sample of code:
val appCapabilities = DesiredCapabilities()
appCapabilities.setCapability("app", "Root");
val ses = WindowsDriver(URL("http://127.0.0.1:4723"), appCapabilities)
But, as a result I have such log:
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 400. Message: Bad capabilities. Specify either app or appTopLevelWindow to create a session
Driver info: io.appium.java_client.windows.WindowsDriver
Command: [null, newSession {capabilities=[{appium:app=Root, appium:automationName=Windows, appium:deviceName=WindowsPC, platformName=WINDOWS}], desiredCapabilities=Capabilities {app: Root, appium:automationName: Windows, deviceName: WindowsPC, platformName: WINDOWS}}]
Capabilities {app: Root, appium:automationName: Windows, deviceName: WindowsPC, platformName: WINDOWS}
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:136)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:133)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:102)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:182)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:250)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:274)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:157)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:89)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:101)
at io.appium.java_client.windows.WindowsDriver.<init>(WindowsDriver.java:50)
at MainKt.launchOsDriver(Main.kt:46)
at MainKt.main(Main.kt:18)
Issue Analytics
- State:
- Created 4 months ago
- Comments:6
Top Results From Across the Web
Unable to login as root from the login screen even though I ...
I have installed 12.04 LTS but surprisingly not able to login as root. I have unlock and set the password for root but...
Read more >How to fix 8 common remote desktop connection problems
First, try to establish a session from a client that has been able to successfully connect in the past. The goal is to...
Read more >Can't connect to xrdp as normal user, connecting as root is ...
I had to do the following (from this answer): go into Network Manager > Edit Connections. Select your connection, click Edit and check...
Read more >6 steps for when remote desktop credentials are not ...
3. Make sure that the account is not locked out. If an admin has completed the first two steps and the remote desktop...
Read more >User can't authenticate or must authenticate twice
Troubleshooting an issue in which user can't authenticate or must authenticate twice when starting a remote desktop connection.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
vrumvrumich Try https://github.com/microsoft/WinAppDriver/issues/1866#issue-1584702726
Why do you need windowHandles for the Desktop session? I suppose it is not supported for Desktop session. You should first create an app session and call windowHandles for it.