I have a windows machine that I’m using for testing (Xamarin Droid and WPF, i’ll ). I have Selenium running as a server when the machine restarts but I can’t figure out how to get appium to start when the server restarts. Everything works fine if I start appium (say via the desktop app) manually.
I’m probably missing an important idea and doing things the wrong way.
Our tests are in C# and we are using Teamcity and Octopus for building and deployment.
Ok. So i installed NSSM and I added Appium as a service with C:\Users\user\AppData\Roaming\npm\appium.cmd and --log C:\Testing\log\appium.log --log-teimstamp --log-level error:debug --log-no-colors for the args. I have it logging in with the local system account and checked the “allow to interact with desktop” and have tried both normal and high priority and have tried with checked and unchecked console.
Appium is working and starting up when I restart but its not starting my WPF app when I run a test.
I’ve updated appium to 1.9.1 and WinAppDriver to 1.1, but it cannot start the app. The logs includes: {"status":13,"value":{"error":"unknown error","message":"Failed to locate opened application window with appId: C:\\Testing\\SystemUnderTest\\Latest\\WPF\\TestAutomation\\example.exe, and processId: 8900"}}
I also have the latest desktop app and when I run that my WPF app will start. Those logs use the same escaped path for the app so that’s not it. I’m thinking its a problem with the fact that its running from a servce?
Adam. What service context are you using to start the service?
It’s surely much easier to get your existing remoting framework (Jenkins agent or whatever) so spawn the service in the correct “interactive login session”, this worked on windows 7 and 8. Windows10 has changed service accounts and pretty much removed the old ways of getting interactive logins for services. So yes, it’s authentication related what you are seeing there.
I just wish we had more people regularly checking and trying to help out. Basically Windows removed the ability for services to interact without making code changes to the service that keep the service in a “sandbox”, so you are now stuck with autoadminlogon and autorun. I’ve detected issues with autorun in the past hence the suggestion that you run an “RPC agent” of your own in the autorun. and then use that to start the appium “server”.