This is referring to a previous post, WinAppDriver: Could not start a new session. Response code 400. Message: Missing command parameter: appId , where I mentioned that I start WinAppDriver and even though I specified appId as a desired capability it said it was missing. I am using Selenium and WinAppDriver with Java in Eclipse.
After a lot of debugging, I noticed when I started WinAppDriver the init code takes all the capability names and prefixes an "appium:" to them to make w3c safe apparently. When WinAppDriver starts up it gets an appium:appId, not appId, so it says it is missing.
I am not sure how to keep it from appending "winium:" or how to have the session strip off the "appium:". Any sugegstions?
I will repeat some startup code here from my data provider.
WindowsDriver app = null;
try {
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("appId", "src\\main\\respurces\\dummy.bat");
caps.setCapability("platformName", "Windows");
caps.setCapability("deviceName", "WindowsPC");
app = new WindowsDriver(new URL("http://127.0.0.1:4723"), caps);
app.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);
testData.drv = app;
} catch (Exception e) {
throw new AssertionError(e.getMessage(), e);
}