I am trying to automate tests in a desktop application developed in Delphi, using WinAppDriver.
Programming language: Java 1.8.0_281
IDE: Eclipse, Luna Service Release 2 (4.4.2)
selenium-server-standalone-3.141.59.jar
Appium: java-client-7.4.1.jar
commons-lang3-3.12.0
public class Demo {
public static void main(String[] args) { WindowsDriver driver = null; DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("app", "<path_of_exe_file>"); capabilities.setCapability("platformName","Windows"); capabilities.setCapability("deviceName", "WindowsPC"); try { driver = new WindowsDriver(new URL("http://127.0.0.1:4723"), capabilities); } catch (MalformedURLException e) { e.printStackTrace(); } }
}
The application starts with an info-splash screen and then main application is launched. However following error is displayed in the console:
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: Failed to locate opened application window with appId: <path_of_exe_file>, and processId: 1936 (WARNING: The server did not provide any stacktrace information)
Please let me know, how to solve this.