lib/watir/capabilities.rb in watir-6.7.2 vs lib/watir/capabilities.rb in watir-6.7.3

- old
+ new

@@ -3,10 +3,11 @@ attr_reader :options def initialize(browser, options = {}) @options = options.dup + Watir.logger.info "Creating Browser instance of #{browser} with user provided options: #{@options.inspect}" @browser = if browser == :remote && @options.key?(:browser) @options.delete(:browser) elsif browser == :remote && @options.key?(:desired_capabilities) @options[:desired_capabilities].browser_name.to_sym else @@ -16,25 +17,27 @@ @selenium_opts = {} end def to_args - [@selenium_browser, process_capabilities] + [@selenium_browser, process_arguments] end private - def process_capabilities + def process_arguments url = @options.delete(:url) @selenium_opts[:url] = url if url create_http_client @selenium_opts[:port] = @options.delete(:port) if @options.key?(:port) + @selenium_opts[:driver_opts] = @options.delete(:driver_opts) if @options.key?(:driver_opts) process_browser_options - process_caps + process_capabilities + Watir.logger.info "Creating Browser instance with Watir processed options: #{@selenium_opts.inspect}" @selenium_opts end def create_http_client @@ -92,10 +95,10 @@ @options["safari.options"] = {'technologyPreview' => true} end end end - def process_caps + def process_capabilities caps = @options.delete(:desired_capabilities) if caps warn 'You can now pass values directly into Watir::Browser opt without needing to use :desired_capabilities' @selenium_opts.merge!(@options) \ No newline at end of file