internet-explorer - IE 中的 Protractor 测试

标签 internet-explorer selenium testing webdriver protractor

我只是想在 Internet Explorer 上运行 Protractor 中包含的示例测试,但不会走得太远:(

// An example configuration file.
exports.config = {
  directConnect: true,

  // Capabilities to be passed to the webdriver instance.
  capabilities: {
    'browserName': 'chrome'
  },

  // Framework to use. Jasmine is recommended.
  framework: 'jasmine',

  // Spec patterns are relative to the current working directory when
  // protractor is called.
  specs: ['example_spec.js'],

  // Options to be passed to Jasmine.
  jasmineNodeOpts: {
    defaultTimeoutInterval: 30000
  }
};

我已经尝试将浏览器名称明显更改为“Internet Explorer”和“版本”:11,并且我已经注释掉了 directConnect(因为它正在提示这一点)

我得到的错误是...

WebDriverError:驱动程序可执行文件的路径必须由 webdriver.ie.driver 系统属性设置;有关详细信息,请参阅 https://github.com/SeleniumH Q/selenium/wiki/InternetExplorerDriver。最新版本可以从http://selenium-release.storage.googleapis.com/index.html下载

我已经下载了最新的IE驱动,放在这里...

C:\Users\darrenp\AppData\Roaming\npm\node_modules\protractor\selenium

仍然没有快乐:(

有人能告诉我是否真的可以在 IE 中运行 Protractor 测试,还是我只是在浪费时间?

我知道你会问我为什么要??简单的答案,我必须,我的客户使用 IE,而且只使用 IE,我需要确保我的应用程序在 IE 中很好,而不是像世界其他地方使用的 chrome :)

最佳答案

1) 下载IEDriverServer.exe 2) 放在C:\Windows\System32

exports.config = {
  'autoStartStopServer': true,

  capabilities: {
    'browserName': 'internet explorer'
  },
  framework: 'jasmine',
  specs: ['example_spec.js'],
  jasmineNodeOpts: {
    defaultTimeoutInterval: 30000
  }
};

3)打开Internet Explorer点击选项

4)在安全选项卡>禁用所有区域的保护模式

5) 导航到“隐私”选项卡关闭弹出窗口阻止程序

6)导航到高级选项卡

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

关于internet-explorer - IE 中的 Protractor 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37456099/

相关文章:

internet-explorer - IE 中的 "dojo is undefined"

selenium - 如何使用 Selenium 单击按钮的特定部分以显示选项列表?

java - 如何让Selenium等待页面上的元素被替换(java)

python - 有没有办法配置 Python 日志记录来记录断言失败的内容或上下文?

javascript - 将检查所有文件格式正确的测试添加到 Karma\Travis

javascript - IE11 的 ES6 代理 Polyfill

javascript - 根据项目标签删除 xml 中的行

internet-explorer - 有没有办法得到CSS :not() selector working in IE and Chrome?

python - selenium.common.exceptions.InvalidSelectorException : Message: invalid selector: An invalid or illegal selector was specified

java - 如何在不使用 ANT 的情况下生成 xslt 报告