0
我想加載像下面的幻像js。如何配置Phantomjs驅動程序在linux機器上使用java執行?
File file = new File("src/test/resources/phantomjs-linux");
System.setProperty("phantomjs.binary.path", file.getAbsolutePath());
當我在Linux計算機上執行此得到例外如下:
java.lang.IllegalStateException: The driver is not executable: /home/tomcat-jenkins/workspace/pitchIT/pitchIT-services/src/test/resources/phantomjs-linux
at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:121)
at org.openqa.selenium.phantomjs.PhantomJSDriverService.findPhantomJS(PhantomJSDriverService.java:246)
at org.openqa.selenium.phantomjs.PhantomJSDriverService.createDefaultService(PhantomJSDriverService.java:182)
at org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:99)
at org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:89)
at com.astrazeneca.als.pitchIT.util.BDDUtilities.doInit(BDDUtilities.java:69)
at com.astrazeneca.als.pitchIT.util.BDDUtilities.getDriver(BDDUtilities.java:33)
at com.astrazeneca.als.pitchIT.controller.PitchITHomepageSteps.an_browser_win