java.lang.IllegalStateException:驱动程序不可执行:/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs

Chu*_*hoo 2 java linux selenium jenkins phantomjs

我试图在Jenkins(Unix)中以无头模式运行selenium UI测试.我正在使用正确版本的phantomJS for unix环境.

phantomjs-2.1.1-linux-x86_64/bin/phantomjs
Run Code Online (Sandbox Code Playgroud)

我得到了上面提到的错误.任何见解?如果需要,我会提供更多细节.

java.lang.IllegalStateException: The driver is not executable: /resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs
Run Code Online (Sandbox Code Playgroud)

mat*_*art 5

实际文件需要可执行才能运行.更改文件权限以使其可执行,如:

chmod 755 /resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs
Run Code Online (Sandbox Code Playgroud)

然后重新运行.HTH