티스토리 뷰

자바 셀레니움 java selenium cannot find Chrome binary

아마 여기까지 온 사람은 아주 값비싼 시간을 많이 소비하였으리라 생각한다.

나름 구글링해서 간단한 자바+selenium 을 해보려고 했는데

이런.. 난관에 부딪혔다.

Starting ChromeDriver 89.0.4389.23 (61b08ee2c50024bab004e48d2b1b083cdbdac579-refs/branch-heads/4389@{#294}) on port 28693
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Devtools port number file contents <49195> were in an unexpected format
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: '', ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_211'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:

또 구글링 해보니 크롬 브라우저 버전하고 크롬 드라이버 버전하고 맞지 않는다고 하여

최신버전의 크롬을 다운받아 설치하고 크롬 드라이버도 크롬에 맞는 버전으로 다운받아 세팅하였다.

그리고 또 실행을 해보니.. 

Starting ChromeDriver 90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430@{#429}) on port 2939
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: '', ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_211'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:

비슷한 에러지만 다른 에러가 나타났다.

cannot find Chrome binary

흠..

도대체가 알 수가 없다.

결국에는 알아냈다.

이클립스를 관리자 권한으로 실행하고 소스코드를 실행했더니 잘 돌아갔다.

run eclipse.exe by adminstrator 

잘 실행되었을때 나오는 Console Log

Starting ChromeDriver 90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430@{#429}) on port 3140
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
 org.openqa.selenium.remote.ProtocolHandshake createSession
정보: Detected dialect: W3C







댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함