diff --git a/lib/ferrum/browser/options/chrome.rb b/lib/ferrum/browser/options/chrome.rb index 1cce92df..d4745307 100644 --- a/lib/ferrum/browser/options/chrome.rb +++ b/lib/ferrum/browser/options/chrome.rb @@ -5,7 +5,7 @@ class Browser class Options class Chrome < Base DEFAULT_OPTIONS = { - "headless" => nil, + "headless" => "new", "disable-gpu" => nil, "hide-scrollbars" => nil, "mute-audio" => nil, diff --git a/lib/ferrum/browser/process.rb b/lib/ferrum/browser/process.rb index 9bf1ce8c..afad8b37 100644 --- a/lib/ferrum/browser/process.rb +++ b/lib/ferrum/browser/process.rb @@ -96,7 +96,15 @@ def start end env = Hash(@xvfb&.to_env).merge(@env) + + puts "Starting Chromium" + puts "---" + puts env, *@command.to_a, process_options + puts "---" + @pid = ::Process.spawn(env, *@command.to_a, process_options) + puts "Chromium started with PID: #{pid}" + ObjectSpace.define_finalizer(self, self.class.process_killer(@pid)) parse_ws_url(read_io, @process_timeout)