Created
June 6, 2012 11:04
-
-
Save alisterscott/2881288 to your computer and use it in GitHub Desktop.
Benchmarking the performance of a .set operation on a text field across browsers using watir-webdriver in ruby
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 'selenium-webdriver' | |
require 'watir-webdriver' | |
require 'bench' | |
d = Selenium::WebDriver.for :chrome, native_events: true | |
b = Watir::Browser.new d | |
b.goto 'bing.com' | |
benchmark 'set chrome native' do | |
b.text_field(name: 'q').set 'ghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghgh' | |
end | |
run 10 | |
b.close |
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 'selenium-webdriver' | |
require 'watir-webdriver' | |
require 'bench' | |
b = Watir::Browser.new :chrome | |
b.goto 'bing.com' | |
benchmark 'set chrome non-native' do | |
b.text_field(name: 'q').set 'ghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghgh' | |
end | |
run 10 | |
b.close |
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 'selenium-webdriver' | |
require 'watir-webdriver' | |
require 'bench' | |
b = Watir::Browser.new :firefox | |
b.goto 'bing.com' | |
benchmark 'set firefox' do | |
b.text_field(name: 'q').set 'ghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghgh' | |
end | |
run 10 | |
b.close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment