Is there a way to take screenshots during a scheduled task if the user is not logged in?

I have a scheduled task that runs a Selenium test suite every night at 3:30. These tests also take a screenshot if they are not working and send that screenshot to the development team. However, the problem I am facing is that screenshots only work when I am logged into a virtual machine (Windows Server 2003) that runs the tests. If no one is logged in, the screenshots are black.

Is there an easy way to fix this?

Thank!

-Mark

+2


source to share


3 answers


One thing that worked was using VisualCron instead of a scheduled task. However, this solution is not ideal because the server license for VisualCron is $ 150 +.



+3


source


It looks like this question is related to another question (I noticed it there ->> in the related question area):

Selenium starts up as Windows service to take screenshots on errors



The accepted answer to this question was published by Grzegord Oledski.

If none of these functions work, can you write a batch script to register your account on the computer, run its tests, and then register your account?

+1


source


Is it possible that you just need to run the scheduled task as the user you used to configure it? As far as possible, you are trying to save your screens in the "my documents" folder. If the scheduled task is not running as this user, a permission error will be thrown when trying to write the image to disk. Or, ideally, you can set it up as an administrator, which would resolve all permission issues.

0


source







All Articles