I’m attempting to run a simple module to initialize a Windows desktop application as follows:
import { WindowsDriver } from 'appium-windows-driver'
let defaultCaps = {
deviceName: 'WindowsPC',
app: 'C:\\fullpath to .exe',
platformName: 'Windows'
};
async function startDriver() {
try {
let driver = new WindowsDriver();
await driver.createSession(defaultCaps);
}
catch (err) {
console.log(err);
}
}
startDriver();
I’ve attempted to run this directly with appium or WinAppDriver.exe and it fails with:
WARN BaseDriver The following capabilities were provided, but are not recognized by appium: app.
info BaseDriver Session created with session id: f66a2ab7-f00f-4843-9e0b-f84338b2edfb
info WinAppDriver Verifying WinAppDriver is installed with correct checksum
dbug WinAppDriver Deleting WinAppDriver session
[Error: Could not verify WinAppDriver install; re-run install]
If I run to Appium through webdriverio I see the following:
[Appium] Welcome to Appium v1.6.4 (REV bb17ebf57e67ff160c7ee6c028dd3b5de4118d54)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] → POST /wd/hub/session {“desiredCapabilities”:{“javascriptEnabled”:true,“locationContextEnabled”:true,“handlesAlerts”:true,“rotatable”:true,“deviceName”:“WindowsPC”,“app”:“frmReaderManager”,“platformName”:“Windows”,“requestOrigins”:{“url”:“http://webdriver.io”,“version”:“4.6.2”,“name”:“webdriverio”}}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“javascriptEnabled”:true,“locationContextEnabled”:true,“handlesAlerts”:true,“rotatable”:true,“deviceName”:“WindowsPC”,“app”:“app AutomationID”,“platformName”:“Windows”,“requestOrigins”:{“url”:“http://webdriver.io”,“version”:“4.6.2”,“name”:“webdriverio”}},null,null,null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1493894421416 (05:40:21 GMT-0500 (Central Daylight Time))
[Appium] Creating new WindowsDriver (v0.4.1) session
[Appium] Capabilities:
[Appium] javascriptEnabled: true
[Appium] locationContextEnabled: true
[Appium] handlesAlerts: true
[Appium] rotatable: true
[Appium] deviceName: ‘WindowsPC’
[Appium] app: ‘app AutomationId’
[Appium] platformName: ‘Windows’
[Appium] requestOrigins: { url: ‘http://webdriver.io’,
version: ‘4.6.2’,
name: ‘webdriverio’ }
[BaseDriver] The following capabilities were provided, but are not recognized by appium: javascriptEnabled, locationContextEnabled, handlesAlerts, rotatable, app, requestOrigins.
[BaseDriver] Session created with session id: 10b56024-d112-4c65-9a3f-ede38017a42c
[WinAppDriver] Verifying WinAppDriver is installed with correct checksum
[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:\projects\ project1\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (C:\projects\ project1\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\projects\ project1\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (C:\projects\ project1\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
at run (C:\projects\ project1\node_modules\appium\node_modules\core-js\library\modules\es6.promise.js:108:47)
at C:\projects\ project1\node_modules\appium\node_modules\core-js\library\modules\es6.promise.js:119:28
at flush (C:\projects\project1\node_modules\appium\node_modules\core-js\library\modules$.microtask.js:19:5)
at nextTickCallbackWith0Args (node.js:453:9)
at process._tickCallback (node.js:382:13)
[HTTP] ← POST /wd/hub/session 500 73 ms - 190
This also occurs if I start appium or WinAppDriver on port 4724. Any pointers would be greatly appreciated!!
OS: Windows 10 Home Version 1607, build 14393.447
Appium 1.6.4
WinAppDriver latest version
npm version 3.6.0
[email protected]
[email protected]