watir version = 1.9.2
ruby version = 1.8.7

Hi,
I need to read XML from a document and put it into a textarea.
I use REXML to read the file, but when I try to dump this into the
textarea I get an error and the field shows [object]

eg
        file = File.new( "C:/canoe1.xml" )
        doc = Document.new file
#       puts doc
        $browser.text_field(:id, "NewAEPGrid_ctl02_CoDFBox2").set(doc)

If I uncomment the "puts doc", I can see that the XML is being read
into doc.

If I change the .set(doc) to e.g. .set("test") then the word test is
written OK into the field with no error.

The error I see is:
NoMethodError: undefined method `value' for <UNDEFINED> ... </
>:REXML::Document
    C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.9.1/lib/watir/
input_elements.rb:382:in `method_missing'
    C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.9.1/lib/watir/
input_elements.rb:382:in `set'
    C:/WATIR/CanoeETVScheduler/xml_test.rb:29:in `test01_NewAEP'

Is what I am trying to do actually possible or do I need to
investigate other options (the only similar post I found seemed to
suggest using cut'n'paste from an editor)

Thanks

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to