2011-06-29 63 views
2

官方Google Selenium Wiki(http://code.google.com/p/selenium/wiki/ChromeDriver)中的示例代碼片段都不適用於我。無論是單獨啓動Selenium服務器還是使用ChromeDriverService,它都會在「新的RemoteWebDriver(...)」行掛起。這是我的控制檯上的輸出:Java中的ChromeDriver實例永遠掛起?

/tmp/chromedriver: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory 
Jun 29, 2011 8:46:58 AM org.openqa.selenium.net.UrlChecker waitUntilAvailable 
INFO: Waiting for [Ljava.net.URL;@16df84b 
Jun 29, 2011 8:46:58 AM org.openqa.selenium.net.UrlChecker$1 call 
INFO: Polling http://localhost:21461/status 
Jun 29, 2011 8:46:58 AM org.openqa.selenium.net.UrlChecker$1 call 
INFO: Polling http://localhost:21461/healthz 
Jun 29, 2011 8:46:59 AM org.openqa.selenium.net.UrlChecker$1 call 
INFO: Polling http://localhost:21461/status 
... 

這是投票healthz和狀態永遠?

回答

0

我相信這個線程是指同樣的問題作爲一個你遇到:我有一個類似的問題 http://code.google.com/p/chromium/issues/detail?id=13425

+0

您好,感謝提示,但這不完全是我的問題。我可以毫無問題地手動啓動./google-chrome。它只會在我試圖實例化一個新的ChromeDriver()時掛起。 –

0

。我的Fedora有libbz2.so.1在目錄/ lib64的/,而Chrome的尋找它在/ usr/lib64下/

的解決方案是創建符號鏈接:

sudo ln -s /lib64/libbz2.so.1 /usr/lib64/libbz2.so.1.0 
0

zilupe's answer導致我的權利回答32位的CentOS:

sudo ln -s /lib/libbz2.so.1 /usr/lib/libbz2.so.1.0 

想必他是正確的,如果你有64位的CentOS