Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'selenium-webdriver'
- browser = Selenium::WebDriver.for :firefox
- browser.get "http://localhost/page1"
- # Timeout = 15 sec
- wait = Selenium::WebDriver::Wait.new(:timeout => 15)
- # Find text on the page by regexp
- puts "Test Passed: Page 1 Validated" if wait.until {
- /Testing Web Applications with Ruby and Selenium WebDriver/.match(browser.page_source)
- }
- browser.quit
Advertisement
Add Comment
Please, Sign In to add comment