microsoft / WinAppDriver

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

Selenium-C#- V 4.0.0-rc1-DesiredCapabilities has been deprecated and henceforth the WinAppDriver is not working #1590

Open svadivel0006 opened 3 years ago

svadivel0006 commented 3 years ago

Selenium-C#- V 4.0.0-rc1-DesiredCapabilities has been deprecated and henceforth the WinAppDriver is not working

Expected behavior:

DesiredCapabilities should not be deprecated, as it required for automating the WinAppDriver

Environment

OS: Windows 10 WinAppDriver version: WinAppDriver v1.3 Release Candidate 1 (1.2.99) Language Bindings version: C# Selenium version : Selenium-C#- V 4.0.0-rc1

DesiredCapabilities

DesiredCapabilities1

anunay1 commented 3 years ago

Duplicate of this Bug

ShanmugaPraveenG commented 2 years ago

@svadivel0006 Do we have have any alternative for DesiredCapabilities in 4.0 which can be used along with WinAppDriver to automate windows app

anunay1 commented 2 years ago

AppiumOptions

dtopuzov commented 2 years ago

WinAppDriver can not be used with Appium.WebDriver@5.0.0-beta01 too: https://github.com/appium/appium-dotnet-driver/issues/487

If you want to use latest appium in order to test your Android and iOS apps you should use Appium.WebDriver@5 because at some point Appium 1.x will be end of life. In order to use appium to test Windows desktop apps you should use Appium.WebDriver@4. This makes it imposible to build testing framework for .NET MAUI apps were you test Android, iOS, Windows and macOS with single code base.

diptilenka commented 1 year ago

I am also facing the same issue @anunay1 . what is the solution here.

Screenshot 2023-01-25 213206

anunay1 commented 1 year ago

Degrade the selenium version to 3.

diptilenka commented 1 year ago

but how to do it i

Degrade the selenium version to 3.

how to do it in visual studio ? i down graded to appium.webdriver 3.0.2 but still same issue

Shakevg commented 1 year ago

diptilenka https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio

Select the previous version of Selenium 3.14 and click install

diptilenka commented 1 year ago

diptilenka https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio

Select the previous version of Selenium 3.14 and click install

diptilenka https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio

Select the previous version of Selenium 3.14 and click install

diptilenka https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio

Select the previous version of Selenium 3.14 and click install Screenshot 2023-01-26 132851 Screenshot 2023-01-26 132851 Screenshot 2023-01-26 132851 Screenshot 2023-01-26 132851 Screenshot 2023-01-26 132851 Screenshot 2023-01-26 132851

diptilenka commented 1 year ago

Already done but still Desised capabilities shows error, by the way i got resolved those using var appCapabilities = new AppiumOptions(); appCapabilities.AddAdditionalCapability("app", calApp); appCapabilities.AddAdditionalCapability("platformName", "Windows");

Shakevg commented 1 year ago

@diptilenka Yes, you are right if you use Appium.WebDriver you should use AppiumOptions. Sorry, miss this issue. https://github.com/microsoft/WinAppDriver/blob/a6f3d7bca447e0c13a33f76454600c1fe737ab10/Docs/AuthoringTestScripts.md#testing-a-classic-windows-application