Unable to Initiate Session with WinAppDriver
See original GitHub issueDescription
I’m using WinAppDriver with a Java Framework. When I run the test the following log is displayed:
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
Build info: version: '4.0.0', revision: '3a21814679'
System info: host: 'CHATHURANGA', ip: '192.168.8.148', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.12'
Driver info: io.appium.java_client.windows.WindowsDriver
Command: [null, newSession {capabilities=[{appium:app=C:\Windows\System32\notepad.exe, appium:automationName=Windows, appium:deviceName=WindowsPC, platformName=WINDOWS}], desiredCapabilities=Capabilities {app: C:\Windows\System32\notepad..., appium:automationName: Windows, deviceName: WindowsPC, platformName: WINDOWS}}]
Environment
- Java version: 11
- Appium Java Client version: 8.0.0-beta
- Desktop OS/version: Windows 11
- Selenium version: 4.0.0
Details
Following is the code used to initiate the session:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName","Windows");
capabilities.setCapability("deviceName", "WindowsPC");
capabilities.setCapability("app", "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App");
calculatorSession= new WindowsDriver(new URL("http://127.0.0.1:4723"), capabilities);
calculatorSession.manage().timeouts().implicitlyWait(Duration.ofSeconds(2));
But if I run the same code with the above capabilities using Appium Java Client v7.3.0 and Selenium 3.141 it works fine!
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
java - WinAppDriver: org.openqa.selenium ... - Stack Overflow
WinAppDriver : org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session ... I am trying to automate tests in a desktop ...
Read more >WinAppDriver:It is impossible to create a new session ...
WinAppDriver :It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it ...
Read more >Issue on getting initialize notapad.exe using WinAppDriver
I'm trying to automate windows application like notepad, calculator using WinAppDriver in QAF and java bdd approach. My property file contains below properties....
Read more >Unable to create a new remote session - Record Widows Action
Unable to create a new remote session. Please check the server log for more details. Original error: Failed to locate opened application ...
Read more >WinApp driver with Python for desktop application automation
You must start WinAppDriver first to start the session and then run your code. 6. Once we reach the step of initiating the...
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
The WinAppDriver requires selenium v3 based client for now since Selenium v4 requires W3C spec protocol that is not supported by WinAppDriver yet.
Also:
https://github.com/appium/java-client/blob/master/docs/v7-to-v8-migration-guide.md#strict-w3c-specification-compatibility