Skip to content

Commit

Permalink
chore: reorganise driver arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
wout committed Feb 25, 2024
1 parent cdbb7d4 commit d8af7cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/lucky_flow/selenium/chrome/driver.cr
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ LuckyFlow::Registry.register :headless_chrome do
LuckyFlow::Selenium::Chrome::Driver.new do |config|
remote_debugging_port = ENV.fetch("CHROME_REMOTE_DEBUGGING_PORT", "9222")
config.chrome_options.args = [
"no-sandbox",
"headless",
"disable-gpu",
"remote-debugging-port=#{remote_debugging_port}",
"--no-sandbox",
"--headless",
"--disable-gpu",
"--disable-dev-shm-usage",
"--remote-debugging-port=#{remote_debugging_port}",
]
end
end
2 changes: 1 addition & 1 deletion src/lucky_flow/selenium/firefox/driver.cr
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ LuckyFlow::Registry.register :headless_firefox do
LuckyFlow::Selenium::Firefox::Driver.new do |config|
remote_debugging_port = ENV.fetch("FIREFOX_REMOTE_DEBUGGING_PORT", "9222")
config.firefox_options.args = [
"--no-sandbox",
"--headless",
"--disable-gpu",
"--disable-software-rasterizer",
"--no-sandbox",
"--disable-dev-shm-usage",
"--start-debugger-server=#{remote_debugging_port}",
]
Expand Down

0 comments on commit d8af7cc

Please # to comment.