Watir简单多线程运行实例

来源:互联网 发布:java|| 编辑:程序博客网 时间:2024/05/22 03:45
require 'thread'
require 'watir'  require 'watir/ie' # needed for release 1.6.xdef test_google  ie = Watir::IE.start('http://www.google.com')  ie.text_field(:name, "q").set("pickaxe")      ie.button(:name, "btnG").click     ie.closeend# run the same test three times concurrently in separate browsersthreads = []3.times do  threads << Thread.new {test_google}endthreads.each {|x| x.join}

原创粉丝点击