我正在使用 Jenkins 在 windows slave 上运行 selenium 测试。Windows slave 有 Windows 2016 操作系统。对于已启动的从属实例,我为 Jenkins 使用了 ec2 插件,它使用
winrm 协议来管理我们的节点。测试执行得很好,但屏幕截图的分辨率约为 1024*786(我认为)。但是服务器的分辨率为 1920*1020。如果我在开始测试之前做了 rdp CONNECT TO SLAVE SERVER,屏幕截图将是全尺寸的。我为通过 netplwiz 使用 winrm 的用户添加了自动登录。没有帮助我。
我也试过: 1. 改成windows register: DefaultSettings.XResolution,DefaultSettings.YResolution to 1902*1020;
仅当我在开始测试之前将 rdp 连接到我的服务器时才帮助我。
更新(12.10.2018):
C:\Users\jenkins>powershell -command "Set-DisplayResolution -Width 1920 -Height 1080 -Force"
setres will now attempt to apply the following display settings:
Width: 1920
Height: 1080
The settings passed in could not be applied to the graphics device.
init script ran successfully
我想说明一下,我正在使用 winrm 协议。我创建了一篇有趣的文章 https://serverfault.com/questions/803453/windows-server-2012-default-desktop-size
因此,可能原因在于显示驱动程序(Hyper-V Video)...
慕莱坞森
呼啦一阵风
神不在的星期二
相关分类