Class: Henry::Navigator
- Inherits:
-
Object
- Object
- Henry::Navigator
- Defined in:
- lib/henry/navigator.rb
Overview
Defines a common interface for managing bowsers.
Constant Summary collapse
- DRIVERS =
{ 'INTERNET_EXPLORER' => 'ie' }
Instance Method Summary collapse
-
#close ⇒ Object
Closes the curretn browser.
-
#initialize(driver) ⇒ Navigator
constructor
A new instance of Navigator.
-
#navigate(url) ⇒ Henry::Navigator
Navigates the given URL.
-
#title ⇒ String
Returns the curretn browser title.
Constructor Details
Instance Method Details
#close ⇒ Object
Closes the curretn browser
18 19 20 |
# File 'lib/henry/navigator.rb', line 18 def close browser.close end |
#navigate(url) ⇒ Henry::Navigator
Navigates the given URL
26 27 28 29 30 |
# File 'lib/henry/navigator.rb', line 26 def navigate(url) browser.goto(url) return self end |
#title ⇒ String
Returns the curretn browser title.
35 36 37 |
# File 'lib/henry/navigator.rb', line 35 def title browser.title end |