Class: Screw::Driver::Browser::Safari
- Inherits:
-
Object
- Object
- Screw::Driver::Browser::Safari
- Defined in:
- lib/browsers/safari.rb
Instance Method Summary collapse
Instance Method Details
#kill ⇒ Object
10 11 12 13 14 15 |
# File 'lib/browsers/safari.rb', line 10 def kill puts " killing Safari... " browser_pid = `ps aux | grep -v grep | grep Safari.app`.scan(/\d+/).first system("kill -s SIGTERM #{browser_pid}") puts ' done.' end |
#start ⇒ Object
5 6 7 8 |
# File 'lib/browsers/safari.rb', line 5 def start Thread.new { sleep 1; system "open -n -a Safari 'http://localhost:4567/?body%20%3E%20.describe'" } # t.join end |