When I Try to run a script through windows task scheduler using a .bat file. The script fails to run because winrunner can not identifiy the objects on the screen.
Problem is when the script is scheduled to run on any future time, the PC logged out and screen saver is automatically enabled. Task scheduler run the script without disabling the screen saver so that winrunner unable to find the GUI ibjects mentioned in the GUI map file and eventually the script fails.
Please help me to get out of this situation.keeping in mind that screen saver can not be disabled and system will log-off if left unattended for 5 mins.
If you have the sufficient security access to edit the registry, then you might. IF you do, then you can follow this concept:
1) Set up auto-login into the test system
2) set up a scheduled task to reboot the system (this is going to take some testing as you need to have it far enough prior to the test kickoff that the system is ready to run tests, but not so far that it has the time to go back into a locked state)
3) scheudle a task to run your bat file for the WinRunner tests
4) once the tests are complete, then the computer will automatically go back into a locked state.
If you don't have enough access to edit the registry and set up an auto loging, then you need to think about raising the issue to your management to have them start the process of getting you and your network administration/support group to allow you the access you need to perform your assigned tasks.
"Please help me to get out of this situation.keeping in mind that screen saver can not be disabled and system will log-off if left unattended for 5 mins."
The big question I have is why you can't turn off the screen saver and disable the auto-logoff?
I assume that its because of security concerns - i.e. you don't want to/can't leave a logged on machine unattended overnight.
If that's the issue, I suggest you negotiate the following:
1. Disable the ScreenSaver
2. Disable the auto-logoff
3. Connect to and log on to the machine from another machine using Remote Desktop or Terminal Services (preferred).
4. Run/schedule your sccript as necessray
5. DISCONNECT from the terminal session but DO NOT log off or lock.
For anyone trying to connect to that machine (remotely or at the console), or when you reconnect, it will appear as though the machine has been locked by you, but in reality, your WinRunner script is still chuggin along. As long as you are the one that reconnects, you should have no problem.
If you do this... then the machine is as good as being "locked" from a security standpoint but is still functioning as though its is logged on with no screen saver.
If this is not clear... let me know, I can try explain again.
The only issue you may encounter with this is screen resolution having an impact on analog/coordinate based stuff in your script (but I hope you have very little or none of that). The resolution of your "session" tends to override the actual machine display settings. This is a particular problem with a Powerbuilder app...