Winappdriver: DesiredCapabilities does not work any longer

Created on 17 Sep 2018  路  10Comments  路  Source: microsoft/WinAppDriver

Hello,
when I am trying to use the latest windriver the DesiredCapabilities are no longer supported.
I used the calculator sample https://github.com/appium-boneyard/sample-code/blob/master/sample-code/examples/C%23/CalculatorTest/BasicScenarios.cs for the cross check , this does not work either.
image

These are the lines which cause the trouble.
// Launch the calculator app DesiredCapabilities appCapabilities = new DesiredCapabilities(); appCapabilities.SetCapability("app", "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App"); appCapabilities.SetCapability("platformName", "Windows"); appCapabilities.SetCapability("deviceName", "WindowsPC"); CalculatorSession = new RemoteWebDriver(new Uri(WindowsApplicationDriverUrl), appCapabilities); Assert.IsNotNull(CalculatorSession); CalculatorSession.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(2));

When trying to specify the capabilities I always end at the browser based test.
Could some please tell me what I am doing wrong ?

Enhancement

Most helpful comment

Hi @hassanuz
Could you please prioritize this enhancement?

All 10 comments

Hi @StefanKDD ,

Which version of Selenium are you using? Try to downgrade it to a older version, specially version 3.0.1

Hi,
I am using 3.11.2, . Why should I take an older version ?
When I am updating to the latest appium 1.9..0 this does run well using an older appium like 1.7.2 we do not see the issue. The idea was to update to the most recent versions to check if the problem was solved.

WinAppDriver currently doesn't support Selenium version higher than 3.0.1. The reason you do not see
an issue when using an older version of Appium is that it is calling on an older supported version of Selenium (Appium is a subset of Selenium). So you will have to manually adjust Selenium back to verison 3.0.1 when using a new Appium version.

What is the mostly recommended combination for testing with Appium and the webdriver ?
We are using:
MSTest.TestAdapter v.1.3.2
MSTest.TestFramework v.1.3.2
Selenium.WebDriver V.3.14.0
Castle.Core v.4.3.1
Selenium.Support v.3.14.0
Appium 1.7.2

When we are using a newer Appium version we get more "random" Error during the test execution.

@hassanuz Does this work with xUnit?

Hi @StefanKDD,

Please use Selenium.WebDriver 3.0.1. The other packages should be fine.

@godrose, xUnit is a testing framework and because WinAppDriver is test framework agnostic, so it is expected to work fine (just the same as MSUnit).

Hello,
this is not a valid option, because some feature like ImplicitWait and ScreenshotImageFormat are not supported with the version 3.0.1.

@StefanKDD I don't know about ScreenshotImageFormat, but ImplicitWait is supported by version 3.0.1.
That's how I use it in my project: Session.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(1.5));

Hi, this needs to be addressed. Selenium 4.0 is on the horizon, WinAppDriver should be complient with W3C. Appium is moving forward, so should WinAppDriver.

Hi @hassanuz
Could you please prioritize this enhancement?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jsa34 picture jsa34  路  3Comments

viji-123 picture viji-123  路  4Comments

sky205 picture sky205  路  3Comments

Blank517 picture Blank517  路  4Comments

didhddldlq picture didhddldlq  路  3Comments