WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

DesiredCapabilities does not work any longer

Open StefanKDD opened this issue 8 years ago • 10 comments

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 ?

StefanKDD avatar Sep 17 '18 10:09 StefanKDD

Hi @StefanKDD ,

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

ycoliveira avatar Sep 18 '18 16:09 ycoliveira

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.

StefanKDD avatar Sep 19 '18 07:09 StefanKDD

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.

hassanuz avatar Sep 25 '18 23:09 hassanuz

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.

StefanKDD avatar Sep 27 '18 07:09 StefanKDD

@hassanuz Does this work with xUnit?

godrose avatar Sep 29 '18 20:09 godrose

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).

hassanuz avatar Oct 02 '18 22:10 hassanuz

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

StefanKDD avatar Oct 04 '18 07:10 StefanKDD

@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));

ycoliveira avatar Oct 04 '18 16:10 ycoliveira

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.

mills-andrew avatar Jul 30 '19 15:07 mills-andrew

Hi @hassanuz Could you please prioritize this enhancement?

dhapolapankaj avatar Jan 23 '21 17:01 dhapolapankaj