Created
October 23, 2019 04:15
-
-
Save yongfook/a86004a9ca1007c8d4af9a689ed0f1d8 to your computer and use it in GitHub Desktop.
Debugging Selenium / Browserless.io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
caps = Selenium::WebDriver::Remote::Capabilities.chrome("goog:chromeOptions" => { | |
"args" => [ | |
"--disable-background-timer-throttling", | |
"--disable-backgrounding-occluded-windows", | |
"--disable-breakpad", | |
"--disable-component-extensions-with-background-pages", | |
"--disable-dev-shm-usage", | |
"--disable-extensions", | |
"--disable-features=TranslateUI,BlinkGenPropertyTrees", | |
"--disable-ipc-flooding-protection", | |
"--disable-renderer-backgrounding", | |
"--enable-features=NetworkService,NetworkServiceInProcess", | |
"--force-color-profile=srgb", | |
"--hide-scrollbars", | |
"--metrics-recording-only", | |
"--mute-audio", | |
"--headless", | |
"--no-sandbox", | |
] | |
}) | |
browserless_url = "https://#{ENV['BROWSERLESS_API_TOKEN']}@chrome.browserless.io/webdriver" | |
puts browserless_url | |
@driver = Selenium::WebDriver.for :remote, url: browserless_url, desired_capabilities: caps | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment