Skip to content

Commit 33b16bd

Browse files
committed
Add mobile to browser options
This way we can use Cuprite to register a driver that in turn enables mobile emulation in the browser.
1 parent a071969 commit 33b16bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/ferrum/browser/options.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Options
1515
:js_errors, :base_url, :slowmo, :pending_connection_errors,
1616
:url, :ws_url, :env, :process_timeout, :browser_name, :browser_path,
1717
:save_path, :proxy, :port, :host, :headless, :browser_options,
18-
:ignore_default_browser_options, :xvfb, :flatten
18+
:ignore_default_browser_options, :xvfb, :flatten, :mobile
1919
attr_accessor :timeout, :default_user_agent
2020

2121
def initialize(options = nil)
@@ -31,6 +31,7 @@ def initialize(options = nil)
3131
@pending_connection_errors = @options.fetch(:pending_connection_errors, true)
3232
@process_timeout = @options.fetch(:process_timeout, PROCESS_TIMEOUT)
3333
@slowmo = @options[:slowmo].to_f
34+
@mobile = @options.fetch(:mobile, false)
3435

3536
@env = @options[:env]
3637
@xvfb = @options[:xvfb]

0 commit comments

Comments
 (0)