/ / Imputando floots en el campo de texto Watirs - ruby, watir

Imputing floots en el campo de texto Watirs - ruby, watir

Estoy tratando de imputar datos de una matriz en unasitio web, sin embargo estoy recibiendo un error. Creo que el error significa que no puedo "poner floots en campos de texto, así que cambié el floot en una cadena. Pero de nuevo no funcionó. Solo he incluido la parte del código que me pareció relevante.

Blockquote

eee = Watir::Browser.new

eee.goto(fulllink)
eee.text_field(:name => "txtAttr").set Headings[j]
eee.wait
p = j + 1
strings = body.at(0).at(p)
String (strings)
eee.text_field(:name => "txtValue").set strings
eee.wait
eee.link(:index => 4).click
eee.wait
eee.close
end
i += 1


C:UsersPure.itloaner1-12Google Driveruby>ruby ExST.rb
hello world
Alpha Numeric Unit #
tables filled
200.0
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/input_
elements.rb:356:in `characters_in": undefined method `each_char" for 200.0:Float
(NoMethodError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-c
lassic/input_elements.rb:337:in `type_by_character"
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-c
lassic/input_elements.rb:299:in `set"
from ExST.rb:92:in `<main>"

Respuestas

0 para la respuesta № 1

prueba si cambias String(strings) a strings = String(strings) trabajos.