I second that. That log is your best friend. I have a similiar form
where I have a whole slew of checkbox. The way you have the input named
it might be coming through as:
params[:different][:billing_info]
So in your log it might say something like:
{"different" => {"billing_info"=>"1"}}
-S
"different_billing_info"=>"0"
so
params[:different_billing_info] is "0"
go on with debugging with logger.info
eg:
logger.info "FOO: #{params[:different_billing_info]}"
if (params[:different_billing_info] == "1")
logger.info "FOO: #{params[:different_billing_info]} == '1' true"
billing_address_hash.merge(params[:billing_address])
else
logger.info "FOO: #{params[:different_billing_info]} == '1' false"
billing_address_hash.merge(params[:customer])
# Remove customer fields not found in the billing address table
billing_address_hash.delete('uva_status')
billing_address_hash.delete('email')
end
just put logger.info at every step and check development.log for it's
output
<input type="checkbox" name="different_billing_info"
id="different_billing_info">
We are using
if checkbox(:id,"different_billing_info") == "1"
puts "checkbox is checked"
else
puts "checkbox is unchecked"
Its is not working can you please help in Ruby-Watir scripting
Thanks for
if checkbox(different_billing_info) == "true"
puts "checkbox is checked"
else
puts "checkbox is unchecked"
try this
I have used
puts checkbox(different_billing_info).checked?
and it working thanks again folks