Internet Explorer 8 64 位和 Selenium 不工作 [英] Internet Explorer 8 64bit and Selenium Not working
问题描述
我正在尝试运行 selenium 测试.然而,每次我尝试运行应该运行 IE 的测试时,我都会在 htmlutils.js 的第 863 行出现错误,它说我应该禁用弹出窗口阻止程序.问题是我去了 IE 工具-> 关闭弹出窗口.
I am trying to get selenium tests to run. Yet every time I try to run a tests that should run IE I get a error on line 863 of htmlutils.js It says that I should disable my popup blocker. The thing is I went to IE tools-> turn of popup block.
所以它被禁用了,我收到了这个错误.
So it is disabled and I get this error.
还有什么我需要禁用的.由于我使用的是 Windows 7 Pro 64 位版本,因此实际上我什至不知道它正在运行什么版本的 Internet Explorer.因此,当我确实使用 IE 时,我使用 64 位版本,但我不知道该站点或类似的东西是否不支持 64 位,它会转为 32 位.
Is there something else I need to disable. I actually don't even know what version of Internet explorer it is running since I am using Windows 7 Pro 64bit version. So when I do use IE I use 64bit version but I am under the understanding if the site or something like that does not support 64bit it goes to 32bit.
所以不确定我需要做什么才能让它工作.
So not sure what I need to do it to make it work.
这是它所做的行
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?");
}
此 log.error 消息存储在哪里?也许我也可以发这个.
Where is this log.error message stored? Maybe I can post that too.
推荐答案
我在 Vista 和 IE8 上遇到了类似的问题我会收到同样的错误信息
I had a similar problem on Vista and IE8 I would get the same error message
Couldn't open app window; is the pop-up blocker enabled?"
以管理员身份运行我的遥控器对我来说不是一个选择,从安全角度来看也是一个糟糕的主意.所以最后我设法通过将浏览器从*ietha"更改为*iexploreproxy"来解决这个问题grid_configuration.yml
Running my remote control as Admin wasn't an option for me, and also a poor idea from a security perspective. So in the end I manage to solved this by changeing browser from "*ietha" to "*iexploreproxy" grid_configuration.yml
hub:
port: 4444
...
- name: "Internet Explorer 8 on Vista"
browser: "*iexploreproxy"
...
或者,您可以从代码中更改浏览器字符串:
Alternatively, you can change browser string from the code:
ISelenium selenium = new DefaultSelenium("localhost", 4444, "*iexploreproxy", "http://www.google.com/");
就像一个魅力.唯一的问题是这是否会以某种方式影响测试用例的结果.到目前为止还没有,但我会更新这个答案,以防万一.
Works like a charm. The only question remaing is if this somehow affects the outcome of the test cases. So far no, but I'll update this answer in case that would happen.
这篇关于Internet Explorer 8 64 位和 Selenium 不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!