microsoft / WinAppDriver

Windows Application Driver
MIT License
3.65k stars 1.4k forks source link

WinAppDriver stopped working for windows application Appium 5+ #2019

Open PeterExtrapreneur opened 1 month ago

PeterExtrapreneur commented 1 month ago

Hi!

Im trying hard to update Appium to version 5 and Selenium to 4.20+ but it seems not possible anymore? (Testing target UWP & WPF apps)

As I understand it has Windows-Driver been abandoned by Microsoft? Or will this be fixed in the future? A refactor of my code-base is not optional.

```

AppiumOptions appiumOptions = new AppiumOptions(); appiumOptions.AddAdditionalCapability("app", Path); appiumOptions.AddAdditionalCapability("deviceName", "WindowsPC"); appiumOptions.AddAdditionalCapability("ms:waitForAppLaunch", 1); Driver = new WindowsDriver(new Uri("http://127.0.0.1:4723"), appiumOptions);

anunay1 commented 1 month ago

Winappdriver is not w3c compliant yet. will not work with selenium 4.

kadakchdn commented 1 month ago

WindowsDriver driver;

    @BeforeTest
    public void setUp() throws MalformedURLException
    {
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("platformName", "Windows");
        capabilities.setCapability("deviceName", "WindowsPC");
      capabilities.setCapability("app", "C:\\Windows\\System32\\calc.exe);
     capabilities.setCapability("automationName", "WinAppDriver");

      URL url = new URL("http://localhost:4723");
     driver = (WindowsDriver)new RemoteWebDriver(url, capabilities);

    }

I am facing issue with launching the session, can you please the error or any mismatch

org.seleniumhq.selenium selenium-java 4.1.0 org.testng testng 7.4.0 io.appium java-client 9.2.3 @anunay1 @PeterExtrapreneur
anunay1 commented 1 month ago

Will not work with selenium 4 you need to downgrade to version 3