我正在尝试在Heroku上使用Ruby运行无头Chrome。我已经安装了buildpacks https://github.com/heroku/heroku-buildpack-google-chrome/ 和 https://github.com/heroku/heroku-buildpack-chromedriver 并设置了Selenium driver_path到正确的位置(在设置Selenium driver path之前,我会得到
当我尝试使用
欢迎提出任何建议。
cannot find Chrome binary
,设置为由buildpack设置的GOOGLE_CHROME_BIN
变量后,我会得到unable to connect to chromedriver
)。当我尝试使用
Watir :: Browser.new:chrome
或Watir :: Browser.new:chrome,headless:true
启动Selenium / Watir时,我会得到Selenium :: WebDriver :: Error :: WebDriverError:unable to connect to chromedriver 127.0.0.1:9516
。欢迎提出任何建议。