0

Selenium webdriver 용 javascript API 인 Webdriver.io를 사용하여 테스트를 개발하고있었습니다. $ wdio wdio.conf.js 명령을 실행할 때 오류가 발생할 때까지 테스트를 원활하게 진행했습니다. 오류는Selenium Webdriver.io 오류 메시지 오류 : 예기치 않은 식별자 firefox

>ERROR: Unexpected identifier 
firefox 
Syntax at exports.runInThisContext (vm.js:53:16) 
    at Module._compile (module.js:374:25) 
    at Object.Module._extensions..js (module.js:417:10) 
    at Module.load (module.js:344:32) 
    at Function.Module._load (module.js:301:12) 
    at Module.require (module.js:354:17) 
    at require (internal/module.js:12:17) 
    at Object.<anonymous> (/home/joe/Desktop/Webtesting/test/test.js:10:17) 
    at Module._compile (module.js:410:26) 
    at Object.Module._extensions..js (module.js:417:10) 

이전 커밋을 체크하고 동일한 오류가 발생했기 때문에 코드에서 오류가 될 수 없습니다. 내가 문제를 파악

capabilities: [{ 
     // maxInstances can get overwritten per capability. So if you have an in-house Selenium 
     // grid with only 5 firefox instance available you can make sure that not more than 
     // 5 instance gets started at a time. 
     maxInstances: 5, 
     // 
     browserName: 'firefox' 
    }], 
+0

외부로 maxInstances를 이동하려 했습니까? 설명서를 확인하십시오. – lauda

+0

방금 ​​외부에서 기능을 이동하려고 시도했지만 작동하지 않았습니다. 내 설정은 문서와 거의 같습니다. 참조 용 문서는 다음과 같습니다. http://webdriver.io/guide/testrunner/configurationfile.html –

답변

0

: 내가 크롬 브라우저의 이름을 변경할 때 오류에도 지속, 특히이이 줄에서 wdio.conf.js 파일의 오류로 보인다. 그것은 실제로 내 자신의 코드에서 구문 오류가 발생했습니다. 나는 단순히 오류 메시지를 잘못 해석했다. 예기치 않은 식별자가 'firefox'가 아니므로 사용중인 브라우저의 이름이 테스트가 시작되기 전에 항상 기록되므로 "예기치 않은 식별자"오류의 일부인 것으로 보입니다. 자신 만의 코드를 살펴보고 구문 오류를 찾으십시오. webdriver.io에 문제가 없습니다.

관련 문제