Class: Makuri::BrowserBuilder::Chrome

Inherits:
Base
  • Object
show all
Defined in:
lib/makuri/browser_builder/chrome.rb

Instance Attribute Summary

Attributes inherited from Base

#request_body, #request_method, #user_agent

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Makuri::BrowserBuilder::Base

Instance Method Details

#visit(url) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/makuri/browser_builder/chrome.rb', line 5

def visit(url)
  raise invalid_request_message if request_method != :get

  @browser = Selenium::WebDriver.for :chrome, options: browser_options
  @browser.get url
  @browser.page_source
end