Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'selenium-webdriver'
- browser = Selenium::WebDriver.for :firefox
- File.open("test.html", "w") { |file| file << "<h1>hello</h1>" }
- begin
- browser.get "file://#{File.expand_path '../test.html', __FILE__}"
- puts browser.find_element(:tag_name => "h1").text
- ensure
- browser.quit
- end
Add Comment
Please, Sign In to add comment