無法運行無頭測試模式模式;它似乎不是一個片段的問題,因爲我以不同的方式嘗試它,結果是一樣的。未知錯誤:無法自動擴展
caps = Selenium::WebDriver::Remote::Capabilities.chrome(chromeOptions: { binary: "/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome",
args: [ "--headless" ]})
@driver = Selenium::WebDriver.for :chrome, desired_capabilities: caps
錯誤
unknown error: cannot get automation extension
from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
(Session info: headless chrome=59.0.3071.115)
(Driver info: chromedriver=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b),platform=Mac OS X 10.12.3 x86_64) (Selenium::WebDriver::Error::UnknownError)
Chrome browser: 59.0.3071.115 (latest)
Chrome driver: chromedriver=2.31.488774 (latest)
Language used: Ruby
你使用任何最大化功能? – Madhan
啊,那是小人......感謝馬丹;你能否在這篇文章中回答相同的問題 –