Ranorex with Task Scheduler

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
hanguyen2009
Posts: 18
Joined: Wed May 27, 2015 9:43 am

Ranorex with Task Scheduler

Post by hanguyen2009 » Thu Jul 14, 2016 5:15 am

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Ranorex with Task Scheduler

Post by odklizec » Thu Jul 14, 2016 7:12 am

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/
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

hanguyen2009
Posts: 18
Joined: Wed May 27, 2015 9:43 am

Re: Ranorex with Task Scheduler

Post by hanguyen2009 » Thu Jul 14, 2016 7:49 am

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Ranorex with Task Scheduler

Post by odklizec » Thu Jul 14, 2016 7:55 am

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?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Manova
Posts: 1
Joined: Fri Nov 11, 2016 2:57 am

Re: Ranorex with Task Scheduler

Post by Manova » Fri Nov 11, 2016 3:01 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Ranorex with Task Scheduler

Post by Support Team » Mon Nov 14, 2016 2:57 pm

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