1

https://github.com/camme/webdriverjs으로 작성된 수락 테스트 세트가 있습니다. Selenium Server (WebDriver) 및 Sauce Labs를 통해 실제 브라우저에 대한 테스트를 실행하고 싶습니다. Firefox는 정상적으로 시작하지만 Chromium (Debian Wheezy 패키지의 30.0.1599.101)은 그렇지 않습니다. 단지 { desiredCapabilities: { browserName: "chrome" } }을 설정하여 나는 ERROR COULDNT GET A SESSION ID를 얻을 내가 -Dwebdriver.chrome.driver=/usr/bin/chromium 새 브라우저 창이 나타납니다와 셀레늄 서버를 시작하면 셀레늄 서버 콘솔 출력은Selenium 서버가 Chromium을 실행하지 못합니다.

WARN - Exception: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://code.google.com/p/chromedriver/downloads/list 

을 보여 주지만 테스트 실행을 시작 결코 타임 아웃 후 나는 같은 ERROR COULDNT GET A SESSION ID 및 셀레늄 서버 콘솔을 얻을 출력 표시

Created new window in existing browser session. 13:43:25.775 WARN - Exception thrown java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException 
[...] 
Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException 
[...] 
Caused by: org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. 
[...] 
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start. 
+0

ChromeDriver here

추가 정보는 분명히 내가 크롬 드라이버를 설치하고 지점이 필요합니다 '드라이버 대신 브라우저 바이너리 webdriver.chrome.driver'. –

+0

이제 Chrome 드라이버를 사용하면 한 걸음 더 나아갈 수 있습니다. 크롬이 시작되지만 '알 수없는 명령'WaitForAllTabsToStopLoading '이 응답으로 시작되면서 테스트가 제대로 시작되지 않습니다. –

답변

2

올바른 방법으로 ChromeDriver 실행 파일 경로를 설정하십시오.

System.setProperty를 ("webdriver.chrome.driver", "/ 경로// chromedriver에") // 그런 다음 드라이버 인스턴스

WebDriver 드라이버 = 새로운 ChromeDriver();

+1

실현 후 한 걸음 더 나아갔습니다. Chrome 드라이버가 필요했습니다. 감사. –

+0

도움이되었다고 ... – Manoj