我在我的testing中使用Selenium WebDriver的PhantomJS二进制文件的Linux版本2.5.0-beta(可在这里 ),但它不工作。 例如,这个testing用例在Ubuntu 16.04中的设置失败:
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
用Java编写脚本?
在Windows的JAVA_HOME中更新系统variables
SIGSTOP和SIGTSTP会损坏JVM吗?
如何打开使用'ip tuntap'创build的tun设备
LDAP绑定Vssearch
我安装了以下依赖项:
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
如何通过Java不断从Linux获取信息,如果目录中有变化?
Tomcat:startup.bat丢失
Oracle Weblogic 12.1.2节点pipe理器状态java.io.IOException
maven-replacer-plugin和windowspath
Java Web Start应用程序在XMonad上显示空的窗口
你有没有安装所有必要的依赖关系?
从2.5测试版公告 :
对于Ubuntu的二进制文件,你需要安装一些依赖项:
PNG
jpeg webp
OpenSSL的
zlib的
fontconfig和freetype
libicu
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。