Page 1 of 1

Ranorex with Task Scheduler

Posted: Thu Jul 14, 2016 5:15 am
by hanguyen2009
Hi Supporters,
I am using Windows Task Scheduler to run Ranorex auto when I go out of office.
I checked the option 'Run whether user is logged on or not' in the Task Scheduler,
Normally, It works when I login the machine and run task Ranorex automation,
But, When I off work, it run by the scheduling in the Trigger, its always failed to could not detected objects

Ranorex.ElementNotFoundException : Failed to find item 'ConstantPricesDataEntry.ConstantPricesDataEntryRep.ConstantPriceInboxHome.GeneralScreen'

Please advise.

Thanks so much,
Ha.

Re: Ranorex with Task Scheduler

Posted: Thu Jul 14, 2016 7:12 am
by odklizec
Hi,

Option 'Run whether user is logged on or not' will not work with Ranorex. The problem is, that Ranorex requires realized desktop, which means user must be always logged in! Once there is started a screensaver or user is logged off, Ranorex is unable to identify elements. So if you want to run tests on your desktop, while you are out of office, you must keep your machine logged in. This is definitely not optimal solution ;)

I would suggest to setup a VM, where you can run your tests and which you can leave logged in. Ideally, use it together with some sort of continuous integration, which agent can keep your VM online and logged in (Jenkins, Bamboo, etc...). There are plenty of Ranorex integration tutorials at Ranorex Blog:
http://www.ranorex.com/blog/

Re: Ranorex with Task Scheduler

Posted: Thu Jul 14, 2016 7:49 am
by hanguyen2009
Thanks for your answer,
I am ready using Bamboo and run auto testing on the bamboo agent machine,
but, it also doesn't work when setting up bamboo agent run with account services,
however well done by normal user login.

Thanks again,
Ha.

Re: Ranorex with Task Scheduler

Posted: Thu Jul 14, 2016 7:55 am
by odklizec
Yes, Ranorex does not work if the Bamboo agent is started as a service, which is using system account! Simply, Ranorex does not work with 'system' account. This is why you should never start Bamboo (any CI tool) as a service (as described in Ranorex integration guides). Hope this helps?

Re: Ranorex with Task Scheduler

Posted: Fri Nov 11, 2016 3:01 am
by Manova
Hi Team,

i tried using Task Schedular to run the project. it successfully launched the projectname.exe file. but the report dint created. can you tell me why it happened. i just tried launch the projectname.exe by double clicking on it. i could see the report

Regards,
Manova

Re: Ranorex with Task Scheduler

Posted: Mon Nov 14, 2016 2:57 pm
by Support Team
Hello Manova,

Please try to reset your report configuration, e.g. file location, to the default. Please ensure that your test and your report gets stored locally and that you have sufficient permission to read and write from the folder where your report gets stored.

Furthermore, please try deleting the following file from your system
C:\Users\YOUR_USER_NAME\AppData\Roaming\RanorexRecentReports.dat

I hope this helps.

Sincerely,
Robert