Created
January 11, 2011 17:58
-
-
Save jarib/774802 to your computer and use it in GitHub Desktop.
fx launch debug script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "selenium-webdriver" | |
$DEBUG = true | |
profile = Selenium::WebDriver::Firefox::Profile.new | |
profile.log_file = File.expand_path("firefox.log") | |
profile.log_file.gsub!("/", "\\") if Selenium::WebDriver::Platform.windows? | |
begin | |
driver = Selenium::WebDriver.for :firefox, :profile => profile | |
driver.quit | |
ensure | |
Dir['firefox*.log'].each { |file| | |
p :file => file | |
puts File.read(file) | |
File.unlink file | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment