java.lang.IllegalStateException: The driver is not

2019-07-13 14:05发布

问题:

I am trying to run selenium UI test in headless mode in Jenkins(Unix). I am using the correct version of phantomJS for unix environment.

phantomjs-2.1.1-linux-x86_64/bin/phantomjs

I get the above mentioned error. Any insight? I will provide more details if needed.

java.lang.IllegalStateException: The driver is not executable: /resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs

回答1:

the actual file needs to be executable in order to run. change file permissions to make it executable like:

chmod 755 /resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs

and then re-run. HTH