配列からWebサイトにデータを入力しようとしていますが、エラーが発生します。エラーはフルートをテキストフィールドに入れることができないことを意味すると信じているので、フルートを文字列に変更しました。しかし、再びそれは機能しませんでした。関連性があると感じたコードの部分のみを含めました。
ブロッククォート
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:\Users\Pure.itloaner1-12\Google Drive\ruby>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>'