require 'watir'
ie = Watir::Browser.new
ie.goto "http://www.wallpapers.com/windows/Wallpapers/Animals/Dogs"
ie.select(:id, "ctl00_CPH1_ctl00_ddlSortExpression").flash
ie.select(:id, "ctl00_CPH1_ctl00_ddlSortExpression").set("Newest")
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/element.rb:433:in `method_missing': undefined method `set' for #<Watir::SelectList:0x31be0b8> (NoMethodError)
from sample.rb:9:in `<main>'
也尝试了相同的结果:
ie.select(:id, "ctl00_CPH1_ctl00_ddlSortExpression").to_subtype.set("Newest")