Index: watir.rb =================================================================== --- watir.rb (revision 1163) +++ watir.rb (working copy) @@ -4100,7 +4100,12 @@ # set the file location in the Choose file dialog in a new process # will raise a Watir Exception if AutoIt is not correctly installed - def set(setPath) + def set(setPath, *args) + args_hash = Hash.new + args.each do |arg| + arg.each_pair{|key, value| args_hash[key] = value } + end + assert_exists require 'watir/windowhelper' WindowHelper.check_autoit_installed @@ -4112,7 +4117,11 @@ rescue raise Watir::Exception::WatirException, "Problem accessing Choose file dialog" end - click + if args_hash[:no_wait] + click! + else + click + end end end