Class: Screw::Driver::Browser::Firefox

Inherits:
Object
  • Object
show all
Defined in:
lib/browsers/firefox.rb

Instance Method Summary collapse

Instance Method Details

#killObject



12
13
14
15
16
17
# File 'lib/browsers/firefox.rb', line 12

def kill
  puts "   killing Firefox... "
  browser_pid = `ps aux | grep -v grep | grep Firefox.app`.scan(/\d+/).first
  system("kill -s SIGTERM #{browser_pid}")
  puts '   done.'
end

#startObject



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

def start
  Thread.new do
    sleep 1
    system "open -a Firefox 'http://localhost:4567/?body%20%3E%20.describe'"
  end
end