量角器与iedriver v = 3.3.0

时间:2017-04-11 08:20:08

标签: internet-explorer protractor gulp-protractor

错误报告

  • 节点版本:6.9.1
  • 量角器版本:5.1.1
  • Angular Version:1.6.1
  • 浏览器:ie32
  • 操作系统和版本win10
  • Рrotractor配置文件:

exports.config = {
    seleniumArgs: [],
    maxSessions: 1,
    multiCapabilities: [{'browserName': 'internet explorer'}],
    specs: ['e2e.bundle.js',]
};

我不会使用"gulp-protractor": "^4.1.0"

如果我跑:

node node_modules\gulp-protractor\node_modules\protractor\node_modules\webdriver-manager\bin\webdriver-manager update --ie32

C:\Users\vgorbachev\project\source\jsengine>node node_modules\gulp-protractor\node_modules\protractor\bin\protractor
[18:40:46] I/launcher - Running 1 instances of WebDriver
[18:40:46] I/local - Starting selenium standalone server...
[18:40:47] I/local - Selenium standalone server started at http://172.16.4.97:64741/wd/hub
[18:40:47] E/launcher - The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://selenium-release.storage.googleapis.com/index.html
[18:40:47] E/launcher - WebDriverError: The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://selenium-release.storage.googleapis.com/index.html
    at WebDriverError (C:\Users\vgorbachev\project\source\jsengine\node_modules\selenium-webdriver\lib\error.js:27:5)
    at Object.checkLegacyResponse (C:\Users\vgorbachev\project\source\jsengine\node_modules\selenium-webdriver\lib\error.js:505:15)
    at parseHttpResponse (C:\Users\vgorbachev\project\source\jsengine\node_modules\selenium-webdriver\lib\http.js:509:13)
    at doSend.then.response (C:\Users\vgorbachev\project\source\jsengine\node_modules\selenium-webdriver\lib\http.js:440:13)
    at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
    at Function.createSession (C:\Users\vgorbachev\project\source\jsengine\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
    at createDriver (C:\Users\vgorbachev\project\source\jsengine\node_modules\selenium-webdriver\index.js:167:33)
    at Builder.build (C:\Users\vgorbachev\project\source\jsengine\node_modules\selenium-webdriver\index.js:632:14)
    at Local.getNewDriver (C:\Users\vgorbachev\project\source\jsengine\node_modules\gulp-protractor\node_modules\protractor\lib\driverProviders\driverProvider.ts:60:29)
    at Runner.createBrowser (C:\Users\vgorbachev\project\source\jsengine\node_modules\gulp-protractor\node_modules\protractor\lib\runner.ts:225:39)
    at q.then.then (C:\Users\vgorbachev\project\source\jsengine\node_modules\gulp-protractor\node_modules\protractor\lib\runner.ts:391:27)
    at _fulfilled (C:\Users\vgorbachev\project\source\jsengine\node_modules\gulp-protractor\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (C:\Users\vgorbachev\project\source\jsengine\node_modules\gulp-protractor\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (C:\Users\vgorbachev\project\source\jsengine\node_modules\gulp-protractor\node_modules\q\q.js:796:13)
    at C:\Users\vgorbachev\project\source\jsengine\node_modules\gulp-protractor\node_modules\q\q.js:604:44
    at runSingle (C:\Users\vgorbachev\project\source\jsengine\node_modules\gulp-protractor\node_modules\q\q.js:137:13)
    at flush (C:\Users\vgorbachev\project\source\jsengine\node_modules\gulp-protractor\node_modules\q\q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
[18:40:47] E/launcher - Process exited with error code 199

确定。 下一步,我将webdriver.ie.driver放入protractor.conf.js

seleniumArgs: [
        "--Dwebdriver.ie.driver=C:/Users/vgorbachev/project/source/jsengine/node_modules/gulp-protractor/node_modules/protractor/node_modules/webdriver-manager/selenium/IEDriverServer3.3.0.exe"
],

如果我跑...:

C:\Users\vgorbachev\project\source\jsengine>node node_modules\gulp-protractor\node_modules\protractor\bin\protractor
[18:51:13] I/launcher - Running 1 instances of WebDriver
[18:51:13] I/local - Starting selenium standalone server...
[18:51:14] E/launcher - Error: Error: Server terminated early with status 1
  at Error (native)
  at earlyTermination.catch.e (C:\Users\vgorbachev\project\source\jsengine\node_modules\selenium-webdriver\remote\index.js:252:52)
  at process._tickCallback (internal/process/next_tick.js:103:7)

[18:51:14] E/launcher - Process exited with error code 100

告诉我哪里错了。 TNX

1 个答案:

答案 0 :(得分:0)

需要设置:

jvmArgs: [
        '-Dwebdriver.ie.driver=' + path.join(__dirname, 'node_modules/protractor/node_modules/webdriver-manager/selenium/IEDriverServer3.4.0.exe'),
    ],

不要使用此案例变量seleniumArgsseleniumArgs--jar <selemium-standalone-server>之后添加参数,java将其作为破坏的参数添加。