我在构建服务器上使用selenium运行了几个自动浏览器测试.在运行Chrome或Firefox驱动程序时截取屏幕没有问题,但在运行Internet Explorer驱动程序时,我只是得到一个黑屏.
Selenium版本:2.53.0 IEDriver:2.53.0
操作系统:Windows Server 2012
浏览器:Internet Explorer 11
我已经完成了文档https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver中所有必需的配置
我还尝试了第三个选项:https: //lostechies.com/keithdahlby/2011/08/13/allowing-a-windows-service-to-interact-with-desktop-without-localsystem/
我还在全球范围内启用了服务交互:https: //msdn.microsoft.com/en-us/library/windows/desktop/ms683502(v = vs.85).aspx
当我远程访问构建服务器时,我可以手动触发运行测试.这很好用.因此,我们的CI(TeamCity)设置必须存在与构建服务器交互的问题.
我目前卡住了,可能需要一些帮助吗?
我收到一个HTML表单.这在数组中有2个或更多元素时工作正常,但是当只收到一个元素时,我得到错误用户[t]在fireBug中为null?
var users = form.elements["uname[]"];
for(t in users) {
dataString += "User: "+users[t].value+"\n"
}
Run Code Online (Sandbox Code Playgroud)
这解决了它:
if( typeof users.value === 'string' ) {
users = [ users ];
}
Run Code Online (Sandbox Code Playgroud)