Class: Puppeteer::Launcher::BrowserOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/puppeteer/launcher/browser_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ BrowserOptions

Returns a new instance of BrowserOptions.



29
30
31
32
33
34
# File 'lib/puppeteer/launcher/browser_options.rb', line 29

def initialize(options)
  @ignore_https_errors = options[:ignore_https_errors] || false
  # `default_viewport: nil` must be respected here.
  @default_viewport = options.key?(:default_viewport) ? options[:default_viewport] : Puppeteer::Viewport.new(width: 800, height: 600)
  @slow_mo = options[:slow_mo] || 0
end

Instance Attribute Details

#default_viewportObject (readonly)

Returns the value of attribute default_viewport.



36
37
38
# File 'lib/puppeteer/launcher/browser_options.rb', line 36

def default_viewport
  @default_viewport
end

#slow_moObject (readonly)

Returns the value of attribute slow_mo.



36
37
38
# File 'lib/puppeteer/launcher/browser_options.rb', line 36

def slow_mo
  @slow_mo
end

Instance Method Details

#ignore_https_errors?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/puppeteer/launcher/browser_options.rb', line 38

def ignore_https_errors?
  @ignore_https_errors
end