0

I am trying to run a simple test of launching a calculator app on windows 10 64bit, I have got appium@1.6.3 installed. As per the doc with installation of appium, winappdriver will also be installed. However when I try to run my test, I see below error, which complains about winappdriver not installed.

C:\WINDOWS\system32>appium
[Appium] Welcome to Appium v1.6.3
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"Microsoft.WindowsCalculator_8wekyb3d8bbwe!App","platformName":"Windows","deviceName":"WindowsPC"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"Microsoft.WindowsCalculator_8wekyb3d8bbwe!App","platformName":"Windows","deviceName":"WindowsPC"},null,null,null,null]
[Appium] Creating new WindowsDriver session
[Appium] Capabilities:
[Appium]   app: 'Microsoft.WindowsCalculator_8wekyb3d8bbwe!App'
[Appium]   platformName: 'Windows'
[Appium]   deviceName: 'WindowsPC'
[BaseDriver] The following capabilities were provided, but are not recognized by appium: app.
[BaseDriver] Session created with session id: c0c6c7e6-b782-4b14-8192-bc78e5b38008
[WinAppDriver] Verifying WinAppDriver is installed with correct checksum
[HTTP] <-- POST /wd/hub/session - - ms - -
[debug] [WinAppDriver] Deleting WinAppDriver session
[MJSONWP] Encountered internal error running command: Error: Could not verify WinAppDriver install; re-run install
    at WinAppDriver.start$ (../../lib/winappdriver.js:35:13)
    at tryCatch (C:\Users\bhawsar\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\bhawsar\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Users\bhawsar\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (C:\Users\bhawsar\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)

Also attaching my test script:

var wd = require("wd");
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
var should = chai.should();
//enable chai assertion chaining
chaiAsPromised.transferPromiseness = wd.transferPromiseness;

var serverConfig = {
    host:'127.0.0.1',
    port:4723,

};

var capabilities = {
    app:'Microsoft.WindowsCalculator_8wekyb3d8bbwe!App',
    platformName:'Windows',
    deviceName:'WindowsPC'
};

var driver;

describe('test calculator',function(){
it('test launch calculator',function(done){

  driver = wd.promiseChainRemote(serverConfig);
  console.log(driver)
  this.timeout(10000);
    var cap=driver.init(capabilities);
    console.log(cap)
         done();
})
});
PB13
  • 1
  • 1
  • 3

3 Answers3

0

Have you installed WinAppDriver in the first place? https://github.com/Microsoft/WinAppDriver/releases , WindowsApplicationDriver.msi

Note: currently it's meant for Win 10 only.

Zaziro
  • 405
  • 4
  • 8
  • Yes I did, C:\Program Files (x86)\Windows Application Driver. Also I have win 10 only. I followed https://jeremylindsayni.wordpress.com/2016/11/18/testing-your-windows-app-with-appium-in-windows-10-and-visual-studio-2015/ . But it didn't work for me. – PB13 Mar 13 '17 at 19:42
  • BTW, found something related: https://github.com/Microsoft/WinAppDriver/issues/100 For me doing this in java, WinAppDriver seems to be starting well ( selenium-java v. 3.2.0, appium java-client v. 5.0.0-BETA5), everything is working fine. – Zaziro Mar 14 '17 at 11:53
0

I know that my reply is too late

I just wanted others to know that the win app driver version in used in appium is too old(0.7) so just download it directly from GitHub (0.9)

teja
  • 127
  • 2
  • 11
0

I noticed that the version of appium and the windows driver have a tight dependency. When installing appium via the desktop app, it won't work. You get the wrong version.

While installing, it downloads the windows driver in your appdata/temp folder. You should remove it.

When installing appium via nmp it will work better, this one downloads the correct windows driver.

When you didn't remove the temp folder download also this one will fail, because it takes that windows driver...