Module: TestNow

Defined in:
lib/testnow.rb,
lib/testnow/android.rb

Defined Under Namespace

Modules: Watir

Instance Method Summary collapse

Instance Method Details

#initObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/testnow.rb', line 11

def init
  ENV['BROWSER'] = "firefox" if ENV['BROWSER'].nil?
  case ENV['BROWSER'].downcase
    when "chrome"
      chrome = Chrome.new
      chrome.launch_driver_chrome
    when "android"
      puts "Coming Soon!!\n"
      puts "Apologies for inconvenience...\n\n"
    when "opera"
      opera = Opera.new
      opera.launch_driver_opera
    when "androidchrome"
      ac = AndroidChrome.new
      ac.launch_driver_android_chrome
    when "ie"
      ie = IE.new
      ie.launch_driver_ie
    when "edge"
      edge = MicrosoftEdge.new
      edge.launch_driver_edge
    when "phantomjs"
      puts "Coming Soon!!\n"
      puts "Apologies for inconvenience...\n\n"
    else
      ff = Firefox.new
      ff.launch_driver_firefox
  end
end

#launch_driver_androidObject



3
4
5
6
# File 'lib/testnow/android.rb', line 3

def launch_driver_android
  @driver = Selenium::WebDriver.for :remote, :desired_capabilities => :android
  @driver
end