Class: Firefox

Inherits:
Browser show all
Defined in:
lib/zfben_hanoi/browsers/firefox.rb

Instance Method Summary collapse

Methods inherited from Browser

#escaped_name, #host, #installed?, #linux?, #macos?, #name, #path, #runnable?, #setup, #supported?, #to_s, #visit, #windows?

Constructor Details

#initialize(path = File.join(ENV['ProgramFiles'] || 'c:\Program Files', '\Mozilla Firefox\firefox.exe')) ⇒ Firefox

Returns a new instance of Firefox.



2
3
4
# File 'lib/zfben_hanoi/browsers/firefox.rb', line 2

def initialize(path = File.join(ENV['ProgramFiles'] || 'c:\Program Files', '\Mozilla Firefox\firefox.exe'))
  @path = path
end

Instance Method Details

#teardownObject



6
7
8
9
10
# File 'lib/zfben_hanoi/browsers/firefox.rb', line 6

def teardown
  if macos? || linux?
    system("killall firefox-bin")
  end
end