Skip to content

Instantly share code, notes, and snippets.

@jarib
Created January 11, 2011 17:58
Show Gist options
  • Save jarib/774802 to your computer and use it in GitHub Desktop.
Save jarib/774802 to your computer and use it in GitHub Desktop.
fx launch debug script
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