在Windows Task Scheduler中以“运行是否登录用户"模式进行屏幕分辨率 [英] screen resolution in mode "Run whether user is logged on or not", in windows task scheduler

查看:241
本文介绍了在Windows Task Scheduler中以“运行是否登录用户"模式进行屏幕分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Python 2.7和Selenium 2.39.0.测试Web应用程序.当我将测试作为Windows(7 Ent.)计划的任务运行,并带有无论用户是否登录,都运行"选项时,它看起来像屏幕分辨率或窗口大小更改;一些按钮隐藏在浏览器窗口底部工具栏的后面,因此Selenium无法单击它.

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 not", it looks like the screen resolution or window sizing changes; Some buttons become hidden behind the toolbar at the bottom of the browser window and therefore, it can't be clicked by Selenium.

如果我选择仅在用户登录时运行"选项,我没有这个问题;即使屏幕被锁定,按钮也是可见且可单击的.

I don't have this problem if I choose the option "Run only when user is logged on"; even if the screen is locked, the buttons are visible and clickable.

根据Windows任务属性,它使用的是同一用户帐户.

According to the Windows task properties, it is using the same user account.

有没有一种方法,浏览器设置或注册表项可以在两种模式下保持相同的分辨率和大小?

Is there a way, browser setting or a registry key which can help to keep the same resolution and size in both modes?

我知道我可以向下滚动页面,但是我试图理解并可能防止这两种模式之间的行为差​​异.

I know I can scroll down the page, but I am trying to understand and may be prevent this difference of behavior between these two modes.

谢谢

推荐答案

我遇到了同样的问题.我尝试了所有可以找到的注册表项,禁用了TMM,但无济于事.

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

在登录用户的情况下运行Selenium似乎是Windows 7为您提供除1024x768以外的另一种分辨率的唯一方法.因此,我最终像这样设置了Selenium虚拟机:让用户在启动时自动登录,然后启动Selenium节点.

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.

这篇关于在Windows Task Scheduler中以“运行是否登录用户"模式进行屏幕分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆