Class: GreenOnion::Webkit

Inherits:
Object
  • Object
show all
Includes:
Capybara::DSL
Defined in:
lib/green_onion/drivers/webkit.rb

Instance Method Summary collapse

Constructor Details

#initializeWebkit

Returns a new instance of Webkit.



8
9
10
# File 'lib/green_onion/drivers/webkit.rb', line 8

def initialize
  Capybara.default_driver = :webkit
end

Instance Method Details

#record(url, path, dimensions) ⇒ Object



12
13
14
15
# File 'lib/green_onion/drivers/webkit.rb', line 12

def record(url, path, dimensions)
  visit url
  page.driver.render(path, dimensions)
end