Class: Taza::Browser

Inherits:
Object
  • Object
show all
Defined in:
lib/taza/browser.rb

Class Method Summary collapse

Class Method Details

.browser_class(params) ⇒ Object



13
14
15
# File 'lib/taza/browser.rb', line 13

def self.browser_class(params)
  self.send("#{params[:driver]}_#{params[:browser]}".to_sym)
end

.create(params = {}) ⇒ Object

Create a browser instance depending on configuration. Configuration should be read in via Taza::Settings.config.

Example:

browser = Taza::Browser.create(Taza::Settings.config)


9
10
11
# File 'lib/taza/browser.rb', line 9

def self.create(params={})
  self.send("create_#{params[:driver]}".to_sym,params)
end