Class: Chemlab::Runtime::Browser
- Inherits:
-
Object
- Object
- Chemlab::Runtime::Browser
- Extended by:
- SingleForwardable
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/chemlab/runtime/browser.rb
Overview
The browser configurator
Defined Under Namespace
Classes: Session
Instance Attribute Summary collapse
-
#browser_options ⇒ Object
readonly
Returns the value of attribute browser_options.
-
#session ⇒ Object
Returns the value of attribute session.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(browser_options) ⇒ Browser
constructor
A new instance of Browser.
- #navigate_to(path) ⇒ Object
Constructor Details
Instance Attribute Details
#browser_options ⇒ Object (readonly)
Returns the value of attribute browser_options.
10 11 12 |
# File 'lib/chemlab/runtime/browser.rb', line 10 def @browser_options end |
#session ⇒ Object
Returns the value of attribute session.
9 10 11 |
# File 'lib/chemlab/runtime/browser.rb', line 9 def session @session end |
Class Method Details
.navigate_to(page_class) ⇒ Object
17 18 19 |
# File 'lib/chemlab/runtime/browser.rb', line 17 def self.navigate_to(page_class) Chemlab.configuration.browser.navigate_to(page_class.path) end |
Instance Method Details
#navigate_to(path) ⇒ Object
21 22 23 24 |
# File 'lib/chemlab/runtime/browser.rb', line 21 def navigate_to(path) @session ||= Chemlab.configuration.browser.session @session.engine.goto(Chemlab.configuration.base_url + path) end |