Module: Watir::Navigation
- Included in:
- Browser
- Defined in:
- lib/watir/navigation.rb
Instance Method Summary collapse
-
#back ⇒ Object
Navigates back in history.
-
#forward ⇒ Object
Navigates forward in history.
-
#goto(uri) ⇒ String
Goes to the given URL.
-
#refresh ⇒ Object
Refreshes current page.
Instance Method Details
#back ⇒ Object
Navigates back in history.
28 29 30 31 |
# File 'lib/watir/navigation.rb', line 28 def back @driver.navigate.back @after_hooks.run end |
#forward ⇒ Object
Navigates forward in history.
37 38 39 40 |
# File 'lib/watir/navigation.rb', line 37 def forward @driver.navigate.forward @after_hooks.run end |
#goto(uri) ⇒ String
Goes to the given URL.
15 16 17 18 19 20 21 22 |
# File 'lib/watir/navigation.rb', line 15 def goto(uri) uri = "http://#{uri}" unless uri&.match?(URI::DEFAULT_PARSER.make_regexp) @driver.navigate.to uri @after_hooks.run uri end |
#refresh ⇒ Object
Refreshes current page.
46 47 48 49 |
# File 'lib/watir/navigation.rb', line 46 def refresh @driver.navigate.refresh @after_hooks.run end |