Class: Henry::Navigator
- Inherits:
-
Object
- Object
- Henry::Navigator
- Defined in:
- lib/henry/navigator.rb
Overview
Defines a common interface for managing bowsers.
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
#initialize(driver) ⇒ Navigator
Returns a new instance of Navigator.
8 9 10 |
# File 'lib/henry/navigator.rb', line 8 def initialize(driver) @driver = driver end |
Instance Method Details
#close ⇒ Object
Closes the curretn browser
13 14 15 |
# File 'lib/henry/navigator.rb', line 13 def close browser.close end |
#navigate(url) ⇒ Henry::Navigator
Navigates the given URL
21 22 23 24 25 |
# File 'lib/henry/navigator.rb', line 21 def navigate(url) browser.goto(url) return self end |
#title ⇒ String
Returns the curretn browser title.
30 31 32 |
# File 'lib/henry/navigator.rb', line 30 def title browser.title end |