This file contains hidden or 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
| visit LoginPage do |page| | |
| page.login_with('foo', 'badpass') | |
| page.text.should include "Login error" | |
| page.text.should include "Secure your account" | |
| end |
This file contains hidden or 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 'selenium-webdriver' | |
| require "benchmark" | |
| profile = Selenium::WebDriver::Firefox::Profile.new | |
| profile.native_events = false | |
| d = Selenium::WebDriver.for :firefox, :profile => profile | |
| d.navigate.to "file:///#{Dir.pwd}/test.html" | |
| e = d.find_element(:id => "q") |
This file contains hidden or 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 'selenium-webdriver' | |
| require "benchmark" | |
| d = Selenium::WebDriver.for :firefox | |
| d.navigate.to "file:///#{Dir.pwd}/test.html" | |
| e = d.find_element(:id => "q") | |
| TESTS = 30 | |
| Benchmark.bmbm do |results| | |
| results.report("clear + send_keys:") { TESTS.times { |
This file contains hidden or 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 'watir-webdriver' # gem install watir-webdriver | |
| require 'rspec' # gem install rspec | |
| class BrowserContainer | |
| attr_reader :browser | |
| def initialize(browser) | |
| @browser = browser | |
| end |