2017-04-03 1 views
2

각도기 버전 : 5.1.1, Firefox 버전 : 47, webdriver 버전 : v0.15.0 Firefox에서 각도기 테스트를 실행하려고하면 다음과 같은 오류가 발생합니다.파이어 폭스에서 각도기 테스트를 실행할 때 새로운 세션 응답을 구문 분석 할 수 없습니다.

[15:13:47] I/launcher - Running 1 instances of WebDriver 
[15:13:47] I/direct - Using FirefoxDriver directly... 
[15:13:53] E/launcher - Unable to parse new session response: {"value": {"sessionId":"e8dc5d2f-a3bd-45db-89c1-a023e31e08e6","value":{"XULappId":"{ec80 
30f7-c20a-464f-9b0e-13a3a9e97384}","acceptSslCerts":false,"appBuildId":"20160604131506","browserName":"Firefox","browserVersion":"47.0","command_id":1 
,"count":1,"device":"desktop","platform":"WINDOWS_NT","platformName":"Windows_NT","platformVersion":"6.3","proxy":{},"raisesAccessibilityExceptions":f 
alse,"rotatable":false,"specificationLevel":0,"takesElementScreenshot":true,"takesScreenshot":true,"version":"47.0"}}} 
[15:13:53] E/launcher - WebDriverError: Unable to parse new session response: {"value": {"sessionId":"e8dc5d2f-a3bd-45db-89c1-a023e31e08e6","value":{" 
XULappId":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","acceptSslCerts":false,"appBuildId":"20160604131506","browserName":"Firefox","browserVersion":"47.0 
","command_id":1,"count":1,"device":"desktop","platform":"WINDOWS_NT","platformName":"Windows_NT","platformVersion":"6.3","proxy":{},"raisesAccessibil 
ityExceptions":false,"rotatable":false,"specificationLevel":0,"takesElementScreenshot":true,"takesScreenshot":true,"version":"47.0"}}} 
    at WebDriverError (C:\DG_Selenium\analytics-qa\TestAutomation\SeleniumFramework\node_modules\selenium-webdriver\lib\error.js:27:5) 
    at doSend.then.response (C:\DG_Selenium\analytics-qa\TestAutomation\SeleniumFramework\node_modules\selenium-webdriver\lib\http.js:445:19) 
    at process._tickCallback (internal/process/next_tick.js:109:7) 
From: Task: WebDriver.createSession() 
    at Function.createSession (C:\DG_Selenium\analytics-qa\TestAutomation\SeleniumFramework\node_modules\selenium-webdriver\lib\webdriver.js:777:24) 
    at Function.createSession (C:\DG_Selenium\analytics-qa\TestAutomation\SeleniumFramework\node_modules\selenium-webdriver\firefox\index.js:640:55) 
    at Direct.getNewDriver (C:\DG_Selenium\analytics-qa\TestAutomation\SeleniumFramework\node_modules\protractor\lib\driverProviders\direct.ts:112:25) 

    at Runner.createBrowser (C:\DG_Selenium\analytics-qa\TestAutomation\SeleniumFramework\node_modules\protractor\lib\runner.ts:225:39) 
    at q.then.then (C:\DG_Selenium\analytics-qa\TestAutomation\SeleniumFramework\node_modules\protractor\lib\runner.ts:391:27) 
    at _fulfilled (C:\DG_Selenium\analytics-qa\TestAutomation\SeleniumFramework\node_modules\q\q.js:834:54) 
    at self.promiseDispatch.done (C:\DG_Selenium\analytics-qa\TestAutomation\SeleniumFramework\node_modules\q\q.js:863:30) 
    at Promise.promise.promiseDispatch (C:\DG_Selenium\analytics-qa\TestAutomation\SeleniumFramework\node_modules\q\q.js:796:13) 
    at C:\DG_Selenium\analytics-qa\TestAutomation\SeleniumFramework\node_modules\q\q.js:556:49 
    at runSingle (C:\DG_Selenium\analytics-qa\TestAutomation\SeleniumFramework\node_modules\q\q.js:137:13) 
[15:13:53] E/launcher - Process exited with error code 199 

구성 파일 :

capabilities : { 
     'browserName' : 'firefox', 
    }, 
    directConnect : true, 

시도 실행 명령 다음

java -jar "C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\s 
elenium-server-standalone-3.3.1.jar" -Dwebdriver.firefox.bin="c:\Program Files\Mozilla Firefox\firefox.exe" 
Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -Dwebdriver.firefox.bin=c:\Program Files\Mozilla Firefox\firefox.e 
xe 
     at com.beust.jcommander.JCommander.parseValues(JCommander.java:742) 
     at com.beust.jcommander.JCommander.parse(JCommander.java:282) 
     at com.beust.jcommander.JCommander.parse(JCommander.java:265) 
     at com.beust.jcommander.JCommander.<init>(JCommander.java:210) 
     at org.openqa.grid.selenium.GridLauncherV3$1.setConfiguration(GridLauncherV3.java:227) 
     at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:155) 
     at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:75) 
+0

안녕하세요, 저는 동일한 문제에 직면하고 있습니다. 어떤 해결책을 찾았습니까? – VishwaKumar

+0

그럴 수 있습니다. - https://github.com/mozilla/geckodriver/issues/555 – VishwaKumar

답변

8

directConnect이 Firefox 52+ 및 각도기 5.1.1에서 작동하지 않습니다. (angular/protractor#4253) directConnect 문제를 제거하기 위해 webdriver-manager의 독립 실행 형 버전을 사용해 보셨습니까? webdriver-관리자를 사용하는 방법

는 :

  • npm install webdriver-manager -g
  • webdriver-manager update
  • webdriver-manager start

localhost:4444/wd/hub에 서버를 시작합니다. config에 seleniumAddress: 'http://localhost:4444/wd/hub'으로 추가하십시오.

또한 새로운 웹 드라이버 버전과 함께 이전 버전의 Firefox (47)를 사용하고 있습니다. 그게 문제를 일으킬 수 있는지 나는 모른다. 정말로 47이 필요합니까, 아니면 업그레이드 할 수 있습니까? 그렇다면 51이 "안정적"이고 52가 약간의 문제를 일으킬 수 있음을 기억하십시오.

+0

고맙습니다. 내 문제가 해결되었습니다. 파이어 폭스를 51로 업데이트하고'webdriver-manager'의 독립형 버전을 실행했습니다. – ssharma

+0

"'directConnect'에 몇 가지 문제가 있습니다. 문제에 대한 링크가있을 수 있습니까? –

+1

[분도기 문제 목록] (https://github.com/angular/protractor/issues/)이지만 이것은 [문제 중 하나]입니다 (https://github.com/angular/protractor/issues/4253).) – wswebcreation