code_junkie

Open Firefox browser with Ruby automation script

Nov 13th, 2011
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. `firefox http://www.google.com`
  2. or
  3. system("firefox http://www.google.com")
  4.  
  5. java -jar selenium-server-xxx.jar
  6.  
  7. @browser = Selenium::Client::Driver.new(
  8. :host => "localhost",
  9. :port => 4444,
  10. :browser => "*firefox", #*iexplore, *firefox3, *safari...
  11. :url => "http://www.google.com/",
  12. :timeout_in_second => 60)
  13. @browser.start_new_browser_session
  14.  
  15. system("open -a /Applications/Firefox.app/Contents/MacOS/firefox-bin http://www.google.com http://www.cpap.com")
Add Comment
Please, Sign In to add comment