screen resolution in mode “Run whether user is logged on or not”, in windows task scheduler

前端 未结 2 1150
孤独总比滥情好
孤独总比滥情好 2021-01-22 19:06

I am using Python 2.7 and Selenium 2.39.0. to test a web application. When I run my test as a Windows (7 Ent.) scheduled task with the option \"Run whether user is logged on or

相关标签:
2条回答
  • 2021-01-22 19:41

    I've had the same problem. I tried all registry keys I could find, disabled TMM, but to no avail.

    Running Selenium with a user logged in seems the only way Windows 7 will give you another resolution than 1024x768. So I ended up setting my Selenium virtual machine like that: have a user log in automatically on startup and launch the Selenium node after that.

    0 讨论(0)
  • 2021-01-22 19:57

    In you selenium test, you can call driver.manage().window().setSize(new Dimension(1920, 1080));

    Even if you screen resoltuion is 1024/768 you browser will have the correct window size and you buttons will display just fine.

    You can also run your window task with user "SYSTEM". So you don't need to worry about opening the user session.

    0 讨论(0)
提交回复
热议问题