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
17 18 19 |
# File 'lib/henry/navigator.rb', line 17 def close browser.close end |
#navigate(url) ⇒ Henry::Navigator
Navigates the given URL
25 26 27 28 29 |
# File 'lib/henry/navigator.rb', line 25 def navigate(url) browser.goto(url) return self end |
#title ⇒ String
Returns the curretn browser title.
34 35 36 |
# File 'lib/henry/navigator.rb', line 34 def title browser.title end |