Class: Watir::Browser
- Inherits:
-
Object
- Object
- Watir::Browser
- Defined in:
- lib/watir/browser.rb
Overview
Reopened Watir::Browser class for working with Rails
Instance Method Summary collapse
-
#goto(url)
Opens the url with the browser instance.
-
#initialize(*args) ⇒ Browser
constructor
Will start Rails instance for Watir automatically and then invoke the original Watir::Browser#initialize method.
Constructor Details
Instance Method Details
#goto(url)
Opens the url with the browser instance. Will add Rails.host and Rails.port to the url when path is specified.
27 28 29 30 |
# File 'lib/watir/browser.rb', line 27 def goto(url) url = "http://#{Rails.host}:#{Rails.port}#{url}" unless url =~ %r{^https?://}i || url == "about:blank" original_goto url end |