Our team has primarily been developing and running our Ranorex Suite from the Ranorex IDE. Recently, we decided to tie in our suite into our Jenkins CI system. I have been exploring a couple different options to do this, one is using Nunit to run the system for us, or secondly having a home built system that we would run from the Ranorex Command Line.
As I was exploring both options, I found that our search functionality doesn't seem to be working properly. We use tryFindSingle searches to identify all of our elements on our application. Since these searches require an object to start the search from, we also have a basic function that just finds our application. The function that searches for our app, has never had any issues at all when run from the Ranorex IDE, but as soon as I try to run it from CLI, or have Nunit run it(which I presume is just calling the CLI as well), the app can not be found.
Here is the Code in Question:
public static WindowsApp getVeevaApp() { WindowsApp app = null; Ranorex.Host.Local.TryFindSingle<Ranorex.WindowsApp>("/winapp[?'" + "Veeva" + "']", 2500, out app); return app; }Our application is called Veeva CRM, but used to be called VeevaMobile internally. Since the application is very new, and still open to a lot of changes, I wanted the search to be more general, to cover any possible changes in name/etc. That is the reason for the wild card search. I've also tried using the PackageName to identify, or other attributes, and have also adjustedthe search time all the way up to 10000ms to give it more time to find the application. Every single version of my searches has worked fine when run through the IDE, but fails every time when run from CLI or Nunit.
Has been tested on 2 different Windows 8.1 Professional VMs
Both are running Ranorex 4.1.4
Any ideas what could be happening here?