I have created a very simple 2 line batch file to run my test suite.
cd C:\Users\xxxx\Documents\Ranorex\RanorexStudio Projects\NightlyRun\NightlyRun\bin\Debug
NightlyRun.exe
I tested it and it works correctly when run from the command line. The test just pulls up IE and goes through a series of steps and closes. Nothing fancy.
The problem is when I set it up to run as a task under Task Scheduler. Every time that it runs, IE starts minimized and my test fails. Like I said above, running the test from the command line works perfectly. What is even more strange, I downloaded a freeware task scheduler (Freebyte Task Scheduler) and it works correctly (IE is not minimized).
Any ideas?
Thanks for your help.
Windows 7 Task Scheduler Problem
Re: Windows 7 Task Scheduler Problem
Did you try this, after starting your IE, before beginning your tests?
repo.<your-IE-Instance>.Self.Maximize();
repo.<your-IE-Instance>.Self.Maximize();
-
- Posts: 18
- Joined: Mon Sep 30, 2013 5:01 pm
Re: Windows 7 Task Scheduler Problem
Thanks for the suggestion bewiss. I did not see the last line of your post and just opened up IE and kicked off the test via the batch file and it worked. After that, I tried it again without opening IE and it worked also. Not sure why, but thank you a bunch for your suggestion.