ChromeDriver instantiation in Java hangs forever?
Neither of the example code snippets from the official Google Selenium Wiki (http://code.google.com/p/selenium/wiki/ChromeDriver) work for me. With either starting the Selenium server standalone or using the ChromeDriverService it hangs at line "new RemoteWebDriver(...)". Here's the output on my console:
/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:21开发者_JS百科461/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
...
It is polling for healthz and status forever?
I believe this thread refers to the same problem as the one you're encountering: http://code.google.com/p/chromium/issues/detail?id=13425
I had a similar problem. My Fedora had libbz2.so.1 in directory /lib64/ whilst Chrome was looking for it in /usr/lib64/
Solution was to create a symbolic link:
sudo ln -s /lib64/libbz2.so.1 /usr/lib64/libbz2.so.1.0
zilupe's answer lead me to the right answer for 32-bit CentOS:
sudo ln -s /lib/libbz2.so.1 /usr/lib/libbz2.so.1.0
Presumably his is right if you have 64-bit CentOS
精彩评论