Class: WatirProxy::Browser

Inherits:
Object
  • Object
show all
Defined in:
lib/watir-proxy.rb

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Browser

Returns a new instance of Browser.



11
12
13
14
15
# File 'lib/watir-proxy.rb', line 11

def initialize(opts = {})
  @drb     = opts[:drb]
  @browser = opts[:browser]
  @options = opts[:options]
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/watir-proxy.rb', line 17

def method_missing(name, *args)
  if @browser
    @browser.send name, *args
  else
    @drb.browser_call @options, name, *args
  end
end