From: KingMaker KingMaker Date: 2010-05-20T22:05:40+09:00 Subject: Read text file and check multiple checkbox Hi Friends, I try to check the Multiple Checkboxes in the page. first i read the value in the text file and assing it to the variable. but the problem is that at the time only one check box are selected. textfile values: selectedLocationOids=0000025354000000630d selectedLocationOids=000002527100000062bc ______________________________________________________________________________ HTML Code: ______________________________________________________________________________ RUBY Script: require 'watir' include Watir require 'logger' opts = {} File.open("c:/test/Flow1.txt") do |f| f.each_line do |line| opts[$1] = $2 if line =~ /^(.*)=(.*)$/ end end @check_location = opts["selectedLocationOids"] @check_location1 = opts["selectedLocationOids"] ie.checkbox(:value,@check_location).set() ie.checkbox(:value,@check_location1).set() -- Posted via http://www.ruby-forum.com/.