ObjectMap.new.instance_eval do
sales_admin_link.click
territories_link.click
end
end
but I am having a hell of a trouble trying to fit it into the below switch statement. Could anyone help?
def enter_employees()
File.open('C:\auto_tests\test_data\employee_data.csv','r') {|f| #use block so file is automatically closed
f.each_line { |line|
next if /^;/ =~ line #check for ';' at start of line
i = 0
line.chomp.split(',').each{|x|
i += 1
next if x.nil? or x == "null" #skip nil or "null" values
case i
when 1 #country
employee_country_id.select(x)
when 2 #depot
employee_depot_id.select(x)
when 3 #first_name
employee_first_name.set(x)
end
puts "#{x} has been input"
}
click_submit
click_new_employee_link
}
}
end
end
cheers
aidy
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
