Slide 10
Slide 10 text
ChromeDriver ઃఆ෦
Capybara.register_driver :selenium_chrome_headless do |app|
options = %w[headless disable-gpu window-size=1280,1200 lang=ja no-sandbox disable-dev-shm-usage
disable-setuid-sandbox no-cache disable-infobars
--enable-features=NetworkService,NetworkServiceInProcess]
driver = Capybara::Selenium::Driver.new(
app,
browser: :chrome,
options: Selenium::WebDriver::Chrome::Options.new(args: options),
desired_capabilities: Selenium::WebDriver::Remote::Capabilities.chrome(
login_prefs: { browser: 'ALL' },
chrome_options: { args: options }))
bridge = driver.browser.send(:bridge)
path = "session/#{bridge.session_id}/chromium/send_command"
bridge.http.call(
:post, path,
cmd: 'Page.setDownloadBehavior',
params: {
behavior: 'allow',
downloadPath: DownloadHelper::PATH.to_s
})
driver
end
ىಈΦϓγϣϯ
ϒϥβઃఆ
HTTPଓઃఆ
10