Class: Chemlab::Runtime::Browser
- Inherits:
-
Object
- Object
- Chemlab::Runtime::Browser
- Extended by:
- Forwardable
- 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
-
#to_s ⇒ Object
The options used to create the browser session.
Constructor Details
Instance Attribute Details
#browser_options ⇒ Object (readonly)
Returns the value of attribute browser_options.
11 12 13 |
# File 'lib/chemlab/runtime/browser.rb', line 11 def @browser_options end |
#session ⇒ Object
Returns the value of attribute session.
10 11 12 |
# File 'lib/chemlab/runtime/browser.rb', line 10 def session @session end |
Class Method Details
.navigate_to(page_class) ⇒ Object
20 21 22 |
# File 'lib/chemlab/runtime/browser.rb', line 20 def self.navigate_to(page_class) Chemlab.configuration.browser.navigate_to(page_class.path) end |
Instance Method Details
#navigate_to(path) ⇒ Object
24 25 26 27 |
# File 'lib/chemlab/runtime/browser.rb', line 24 def navigate_to(path) @session ||= Chemlab.configuration.browser.session @session.engine.goto(Chemlab.configuration.base_url + path) end |
#to_s ⇒ Object
The options used to create the browser session
30 31 32 |
# File 'lib/chemlab/runtime/browser.rb', line 30 def to_s @browser_options.to_s end |