IE中的量角器测试

时间:2016-05-26 08:57:37

标签: internet-explorer selenium testing webdriver protractor

我试图在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'和'版本':11我已经注释掉了directConnect(因为它抱怨这个)

我得到的错误是......

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

下载

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

C:\用户\ darrenp \应用程序数据\漫游\ NPM \ node_modules \量角器\硒

仍然没有快乐:(

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

我知道你会问为什么我想要?简单的答案,我必须,我的客户端使用IE浏览器,只有IE,我需要确保我的应用程序在IE中是好的,而不是像世界其他地方正在使用的Chrome一样:)

1 个答案:

答案 0 :(得分:7)

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)导航至隐私选项卡TurnOff PopUp Blocker

6)导航到“高级”选项卡

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here