K
KingMaker KingMaker
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:
<input type="checkbox" value="0000025354000000630d"
name="selectedLocationOids" id="selectedLocationOids"
class="vmCheckbox">
<input type="checkbox" value="000002527100000062bc"
name="selectedLocationOids" id="selectedLocationOids"
class="vmCheckbox">
______________________________________________________________________________
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()
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:
<input type="checkbox" value="0000025354000000630d"
name="selectedLocationOids" id="selectedLocationOids"
class="vmCheckbox">
<input type="checkbox" value="000002527100000062bc"
name="selectedLocationOids" id="selectedLocationOids"
class="vmCheckbox">
______________________________________________________________________________
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
ie.checkbox