class Watir::Browser
Reopened Watir::Browser
class for working with Rack
Public Class Methods
new(*args)
click to toggle source
Will start Rack
instance for Watir
automatically and then invoke the original Watir::Browser#initialize method.
# File lib/watir/rack/browser.rb, line 9 def initialize(*args) Rack.boot _original_initialize *args end
Also aliased as: _original_initialize
Public Instance Methods
goto(url)
click to toggle source
Opens the url with the browser instance. Will add {Rack.host} and {Rack.port} to the url when path is specified.
@example Go to the regular url:
browser.goto "http://google.com"
@example Go to the controller path:
browser.goto home_path
@param [String] url URL to be navigated to.
# File lib/watir/rack/browser.rb, line 27 def goto(url) url = "http://#{Rack.host}:#{Rack.port}#{url}" unless url =~ %r{^(about|data|https?):}i _original_goto url end
Also aliased as: _original_goto