I am running (just started) appium with WinAppDriver. I guess I need just the driver part of appium since I am using WinAppDriver. Anyway, before invoking the driver I do the following (and I have tried several combinations):
DesiredCapabilities dcaps = new DesiredCapabilities();
// DesiredCapabilities caps = new DesiredCapabilities();
dcaps.setCapability("automationName", "Windows");
// dcaps.setCapability("appId", "{1AC14E77-02E7-4E5D-B744- 2EB1AE5198B7}\\notepad.exe}");
dcaps.setCapability("appId", "C:\\Windows\\System32\\notepad.exe");
dcaps.setCapability("platformName", "");
dcaps.setCapability("deviceName", "WindowsPC");
dcaps.getCapabilityNames();
app = new WindowsDriver(new URL("http://127.0.0.1:4723/"), dcaps);
When I run, I get the error: "Could not start a new session. Response code 400. Message: Missing command parameter: appId ". I saw the below in the WinAppDriver window:
"capabilities": {
"firstMatch": [
{
}
],
"alwaysMatch": {
"appium:app": "C:\\Windows\\System32\\notepad.exe",
"appium:automationName": "Windows",
"appium:deviceName": "WindowsPC",
"platformName": "windows"
}
}
I noticed that in startSession of the appium driver it is changing all the capabilities, like
“ImmutableSet.of(makeW3CSafe(capabilities))” . This method, makeW3Csafe() calls another method, “toW3cName()” which prefixes “appium:” to all the capabilities. WinAppDriver is expecting app or appId, but it receives “appium:appId” or “appium:app” so it thinks it is missing.
Any idea what to do? This is Selenium/Java/WinAppDriver/Eclispe