WinAppDriver + Appium + Selenium Grid issue
I'm attempting to plug my WinAppDriver tests into Selenium Grid. So far, I've been able to create a grid hub on my machine with
java -jar E:\selenium\selenium-server-standalone-3.9.1.jar -role hub
and an Appium node registered to the hub with
appium --nodeconfig AppiumNodeConfig.json -p 4723
The connection is established and seems stable. When I run my tests pointed at the hub, I get this error back:
2018-03-12 18:07:57.083:WARN:osjs.HttpChannel:qtp635371680-20: /wd/hub/session java.io.IOException: org.openqa.grid.common.exception.GridException: Cannot extract a capabilities from the request: {"desiredCapabilities":{"app":"C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\SLDWORKS.exe","platformName":"Windows"},"capabilities":{"firstMatch":[{"app":"C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\SLDWORKS.exe","platformName":"Windows"}]}}
Has anyone experienced this issue and been able to remedy it? My test driver capabilities are as follows
DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.SetCapability("app", <path/to/application>);
solidworksLaunchDriver = new WindowsDriver<WindowsElement>(newUri(<SeleniumHubIP:port/wd/hub>), appCapabilities);
After a bit more fighting I realized my problem was due to my Selenium NuGet package not being up to date. A quick update remedied the "Cannot extract a capabilities from the request" message I was seeing earlier.
In my test scripts, however, I had to add the following line to my driver capabilities in order to run my tests through the grid:
appCapabilities.SetCapability("deviceName", "WindowsPC");
Now my tests execute through Selenium grid without issue.
#122 #294
@caulfield2 Could you please post the AppiumNodeConfig.json so that it will be helpful for us to run the test. I was specifically looking for browerName in nodeconfig.json as I'm trying to run Excel.