cho*_*bo2 21 windows 64-bit selenium windows-7
我想让selenium测试运行.然而,每当我尝试运行应该运行IE的测试时,我在htmlutils.js的第863行出现错误它说我应该禁用弹出窗口阻止程序.问题是我去了IE工具 - >转向弹出块.
所以它被禁用,我收到此错误.
我需要禁用其他东西吗?我实际上甚至不知道它运行的是什么版本的Internet Explorer,因为我使用的是Windows 7 Pro 64位版本.因此,当我使用IE时,我使用的是64位版本,但我理解如果该网站或类似的东西不支持64位,那么它会转到32位.
所以不确定我需要做些什么才能让它发挥作用.
这就是它的作用线
function openSeparateApplicationWindow(url, suppressMozillaWarning) {
// resize the Selenium window itself
window.resizeTo(1200, 500);
window.moveTo(window.screenX, 0);
var appWindow = window.open(url + '?start=true', 'selenium_main_app_window');
if (appWindow == null) {
var errorMessage = "Couldn't open app window; is the pop-up blocker enabled?"
LOG.error(errorMessage);
throw new Error("Couldn't open app window; is the pop-up blocker enabled?");
}
Run Code Online (Sandbox Code Playgroud)
这个log.error消息存储在哪里?也许我也可以发布.
Jon*_*röm 18
我在Vista和IE8上有类似的问题,我会得到相同的错误信息
Couldn't open app window; is the pop-up blocker enabled?"
Run Code Online (Sandbox Code Playgroud)
以管理员身份运行我的遥控器不是我的选择,从安全角度来看也是一个糟糕的主意.所以最后我设法通过将浏览器从"*ietha"更改为"*iexploreproxy"grid_configuration.yml来解决这个问题.
hub:
port: 4444
...
- name: "Internet Explorer 8 on Vista"
browser: "*iexploreproxy"
...
Run Code Online (Sandbox Code Playgroud)
或者,您可以从代码中更改浏览器字符串:
ISelenium selenium = new DefaultSelenium("localhost", 4444, "*iexploreproxy", "http://www.google.com/");
Run Code Online (Sandbox Code Playgroud)
奇迹般有效.唯一的问题是,如果这会以某种方式影响测试用例的结果.到目前为止没有,但我会更新这个答案,万一会发生.
小智 11
我在Windows 7 64bit上碰到了这个问题.
我的解决方案是:
禁用弹出窗口块. - 选择"工具/弹出窗口阻止程序/关闭弹出窗口阻止程序"
禁用IE保护模式. - 取消"工具/ Internet选项/安全/启用保护模式"
最好只为已知的可信主机/地址禁用保护模式.我将把它作为读者的练习.
| 归档时间: |
|
| 查看次数: |
21336 次 |
| 最近记录: |