This did not work for me as my webpage has J__LDESC(the textarea in
question) as the required field and so, on clicking submit button, I get the
error message to fill in the field.
 
Any other suggestions?
 
Suman
 
 
 
 
 
 
try using the value method:
 
@ie.text_field(:name, ..).value='some text'
 
the set method fires all appropriate evens, and generally obeys what the web
page is doing ( ie not letting you enter something that is hidden) but
value= will get round that
 
Paul
 
 
 
 
 
 
  ----- Original Message ----- 
  From: Suman Goel 
  To: wtr-general at rubyforge.org
<http://rubyforge.org/mailman/listinfo/wtr-general>  
  Sent: Thursday, January 25, 2007 10:17 PM
  Subject: [Wtr-general] how to populate hidden text area?
 
 
  My webpage has the following code:
 
   
 
              <textarea name="J__LDESC"
style="visibility:hidden">(NULL)</textarea>
 
   
 
  My watir test has the following code:
 
   
 
              @ie.text_field(:name, "J__LDESC").set("some text")
 
   
 
  I am getting the following error:
 
   
 
                1) Error:
 
  test_MemSlot(TestMemSlot):
 
  WIN32OLERuntimeError: focus
 
      OLE error code:800A083E in htmlfile
 
        Can't move focus to the control because it is invisible, not
enabled, or of a type that does not accept the focus.
 
      HRESULT error code:0x80020009
 
        Exception occurred.
 
      C:/ruby1.8.5/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in
`method_missing'
 
      C:/ruby1.8.5/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `set'
 
      C:/workspace/yhj_slot/test/tc_MemSlot.rb:43:in `test_MemSlot'
 
   
 
   
 
  Could someone help me in resolving this issue?
 
   
 
  Thanks

 

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to