小编典典

IE中的量角器测试

selenium

我试图只是运行包含在Internet Explorer 上的量角器中的示例测试,并且不会太远:(

// 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”和
“ version”:11,并且我已注释掉directConnect(因为它对此有所抱怨

我得到的错误是…

WebDriverError:必须通过
webdriver.ie.driver系统属性设置驱动程序可执行文件的路径;有关更多信息,
请参见https://github.com/SeleniumH Q / selenium / wiki / InternetExplorerDriver。该
最新版本可从以下网址下载//硒release.storage.googleapis.com/index.html:HTTP

我已经下载了最新的IE驱动程序并将其放在这里…

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

仍然没有喜悦:(

有人可以告诉我实际上是否可以在IE中运行量角器测试,
还是我在浪费时间?

我知道您会问我为什么要这么做?一个简单的答案,我必须,我的
客户端只使用IE ,而我使用的是IE,并且我需要确保我的应用在IE中是好的,
而不是像世界其他地方使用的chrome。


阅读 309

收藏
2020-06-26

共1个答案

小编典典

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)导航到“高级”选项卡

2020-06-26