在Unix机器中以无头模式运行量角器测试时,出现以下错误。 认为可能是由于某些权限问题所致,我将执行权限授予了protractor / bin文件夹中的'protractor'文件和protractor conf文件,但没有帮助。
[12:27:50] I/launcher - Running 1 instances of WebDriver
[12:27:50] I/direct - Using ChromeDriver directly...
[12:27:50] E/launcher - spawn EACCES
[12:27:50] E/launcher - Error: spawn EACCES
at exports._errnpException (util.js:1024:11)
at ChildProcess.spawn(internal/child_process.js:325:11)
at Object.exports.spawn(child_process.js:493:9)
at exec (/Ruser1/home/user1/Project1/node_modules/protractor/node_modules/selenium-webdriver/io/exec.js:116:27
at resolveCommandLineFlags.then.args (/Ruser1/home/user1/Project1/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:219:25)
at <anonymous>
我尝试使用以下命令从终端以及jenkins运行测试:
./node_modules/protractor/bin/protractor config/test1_cucumber.conf
但是出现相同的错误。我已经在conf文件中设置了directConnect=true
,并在chromeOptions中传递了--headless
。