Question

I have a project that uses selenium to navigate a site, locate a download link, and download without prompt using Firefox WebDriver.

I have this set up as a scheduled task and initially used my own windows account, but I don't want to use my account. I want this to run no matter what, without relying on an account. So I changed the scheduled task to use the account of "SYSTEM" The log errors out because the application cannot find the file it was supposed to download, this leads me to believe that the file was never downloaded.

Facts: Firefox will download when I log in with a windows account. I am able to change the defaults of this computer so there is no need for talk about Firefox profiles.

My Question: Is there an issue with downloads when triggered through "SYSTEM" instead of using a windows account? Is there a way for me to log in as "SYSTEM" to debug my code?

Était-ce utile?

La solution

Selenium wont run as the SYSTEM account because Selenium needs access to the windows desktop to start a web browser. What you need to do is write your automated tests using PhantomJS and then you should be able to run it as a service or scheduled task under the SYSTEM account.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top