diff --git a/lib/wraith/helpers/save_metadata.rb b/lib/wraith/helpers/save_metadata.rb index 68749c47..ffc7218a 100644 --- a/lib/wraith/helpers/save_metadata.rb +++ b/lib/wraith/helpers/save_metadata.rb @@ -31,4 +31,9 @@ def compare_label def engine wraith.engine end + + def selenium_options + wraith.selenium_options + end + end diff --git a/lib/wraith/save_images.rb b/lib/wraith/save_images.rb index 151e3c6f..6f57ad63 100644 --- a/lib/wraith/save_images.rb +++ b/lib/wraith/save_images.rb @@ -106,6 +106,9 @@ def get_driver 'hide-scrollbars', 'ignore-certificate-errors' ].each { |arg| options.add_argument("--#{arg}") } + meta.selenium_options.each do |opt| + options.add_argument(opt) + end Selenium::WebDriver.for :chrome, options: options end end diff --git a/lib/wraith/wraith.rb b/lib/wraith/wraith.rb index 2d686b3f..cdb9a9ab 100644 --- a/lib/wraith/wraith.rb +++ b/lib/wraith/wraith.rb @@ -82,6 +82,10 @@ def engine engine end + def selenium_options + @config["selenium_options"].to_a + end + def snap_file @config["snap_file"] ? convert_to_absolute(@config["snap_file"]) : snap_file_from_engine(engine) end