Sha256: 3c8330f3768b39693999f4dd78c3cc49612535886d699b72496928b0afe69475
Contents?: true
Size: 576 Bytes
Versions: 12
Compression:
Stored size: 576 Bytes
Contents
require File.dirname(__FILE__) + "/loader" browser = create_browser browser.goto(HTML_DIR + "/forms_with_input_elements.html") TESTS = 10000 res = Benchmark.bmbm do |results| results.report("TextField#set") do TESTS.times { browser.text_field(:id, "new_user_first_name").set("1234567890") } end results.report("TextField#value=") do TESTS.times { browser.text_field(:id, "new_user_first_name").value = "1234567890" } end end puts total = res.inject(0.0) { |mem, bm| mem + bm.real } puts "total : " + total.to_s puts "average: " + (total/res.size.to_f).to_s
Version data entries
12 entries across 12 versions & 6 rubygems