小编典典

Internet Explorer 8 64位和Selenium无法正常工作

selenium

我正在尝试运行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?");
    }

该log.error消息存储在哪里?也许我也可以发布。


阅读 295

收藏
2020-06-26

共1个答案

小编典典

我在Vista和IE8上遇到类似的问题,但会收到相同的错误消息

Couldn't open app window; is the pop-up blocker enabled?"

以管理员身份运行我的遥控器不是我的选择,而且从安全角度来看也是一个糟糕的主意。因此,最后我设法通过将浏览器从“ * ietha”更改为“ * iexploreproxy” grid_configuration.yml来解决了这个问题

hub:
  port: 4444
    ...
    - name: "Internet Explorer 8 on Vista"
      browser: "*iexploreproxy"
    ...

另外,您可以从代码中更改浏览器字符串:

ISelenium selenium = new DefaultSelenium("localhost", 4444, "*iexploreproxy", "http://www.google.com/");

奇迹般有效。剩下的唯一问题是这是否会以某种方式影响测试用例的结果。到目前为止,还没有,但我将更新此答案,以防万一。

2020-06-26