WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Does WinAppDriver support JavaFX based desktop applications? Got exception on launching my JavaFx based desktop application...Need help urgently!

Open Crecentec opened this issue 2 years ago • 1 comments

I'm trying to launch my JavaFX-based desktop application, but it is giving exception. However, it is also launching my desktop application but is unable to locate elements:

I also tried to launch Notepad and Calculator, it is launching Notepad and Calculator successfully without any exception or error.

import io.appium.java_client.windows.WindowsDriver; import org.openqa.selenium.By; import org.openqa.selenium.remote.DesiredCapabilities; import java.net.MalformedURLException; import java.net.URL; import java.time.LocalDate;

public class NewJava { public static void main(String[] args) throws MalformedURLException { DesiredCapabilities cap = new DesiredCapabilities(); cap.setCapability("app", "C:\Users\s.shaukat\Documents\EmpSuit.exe"); cap.setCapability("appium:automationName", "Windows"); cap.setCapability("appTopLevelWindow", "EmpSuit");

    WindowsDriver wd = new WindowsDriver(new URL("http://127.0.0.1:4723/"), cap);
    LocalDate date = LocalDate.now();
    String date2 = date.toString();

    wd.findElement(By.name("EmpSuit")).click();
    wd.quit();
}

}


Exception: Content-Length: 326 Content-Type: application/json; charset=utf-8 Host: 127.0.0.1:4724 User-Agent: selenium/3.141.59 (java windows) X-Idempotency-Key: aee171ba-6ee6-41e1-a373-480d82fd0623

{ "desiredCapabilities": { "app": "C:\Users\markin\Documents\EmpSuit.exe", "platformName": "Windows" }, "capabilities": { "firstMatch": [ { "appium:app": "C:\Users\markin\Documents\EmpSuit.exe", "platformName": "windows" } ] } } HTTP/1.1 500 Internal Error Content-Length: 197 Content-Type: application/json

{"status":13,"value":{"error":"unknown error","message":"Failed to locate opened application window with appId: C:\Users\admin\Documents\EmpSuit.exe, and processId: 1488"}}

Need help urgently. Thanks,

Crecentec avatar Aug 25 '23 05:08 Crecentec

No it doesn't

anunay1 avatar Aug 25 '23 14:08 anunay1