2
私のテストでは、Selenium WebDriver(入手可能なhere)用のPhantomJSバイナリのLinuxバージョン2.5.0-betaを使用していますが、動作しません。たとえば、このテストケースは、Ubuntuの16.04でのセットアップに失敗します。PhantomJS 2.5.0-beta for Selenium WebDriver for Linux
public class PhantomJsTest {
protected WebDriver driver;
@BeforeClass
public static void setupClass() {
System.setProperty("phantomjs.binary.path",
"/path/to/linux-ubuntu-trusty-x86_64/2.5.0/phantomjs");
}
@Before
public void setupTest() {
driver = new PhantomJSDriver();
}
@After
public void teardown() {
if (driver != null) {
driver.quit();
}
}
@Test
public void test() {
// my test
}
}
私が取得エラートレースは以下の通りです:
Jan 16, 2017 12:50:52 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: executable: /home/boni/.m2/repository/webdriver/phantomjs/linux-ubuntu-trusty-x86_64/2.5.0/phantomjs
Jan 16, 2017 12:50:52 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: port: 14863
Jan 16, 2017 12:50:52 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: arguments: [--webdriver=14863, --webdriver-logfile=/home/boni/Documents/dev/other/webdrivermanager/phantomjsdriver.log]
Jan 16, 2017 12:50:52 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: environment: {}
/home/boni/.m2/repository/webdriver/phantomjs/linux-ubuntu-trusty-x86_64/2.5.0/phantomjs: error while loading shared libraries: libicui18n.so.52: cannot open shared object file: No such file or directory
Jan 16, 2017 12:51:13 PM org.openqa.selenium.os.UnixProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)
は、この時点で、このバイナリバギーですか?
UPDATE
私は、次の依存関係がインストール:
sudo apt-get install libicu-dev
を...そして今、私はこのエラーを取得する:
INFO: Detected dialect: OSS
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
Jan 16, 2017 2:39:35 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://localhost:11591: The target server failed to respond
Jan 16, 2017 2:39:35 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://localhost:11591
:2.5ベータannouncementから
sudoのlibicu-devの をインストールapt-getを今、私は別のエラーを取得し、今ではであることは明らかと思われますバグ: 情報:検出された方言:OSS PhantomJSがクラッシュしました。バグ報告ガイド()を読んで、バグレポートを提出してください。 2017年1月16日1:46:01 PM org.apache.http.impl.execchain.RetryExec execute –
Linuxでの使用方法? –
@SantoshHegde Linux版をダウンロードし、解凍して実行します。それとも他の何かを意味するのですか? – Vaviloff