[Wtr-general] How to enter text in textarea with style="display:none"

Jeff Wood jeff.darklight at gmail.com
Mon Nov 28 12:55:12 EST 2005


Try using .value= instead of .set ... .set emulates a user, where .value
pushs the value straight through COM.

j.


On 11/28/05, Sathya Shankar <satti at qantom.com> wrote:
>
> I mean the HTML view source....
>
> Sathya Shankar wrote:
>
> > Can you send me complete source file...
> >
> > Sathya Shankar
> > Angrez Singh wrote:
> >
> >>     a) either you have found a bug in IE or
> >>
> >>
> >> may be or may be not because I am seeing that element on Firefox too.
> >>
> >>     b) You have one more text area with the same name & id which is
> >>     visible.
> >>     so just scroll down and then check if there is another textarea
> >>     with the
> >>     same name and id which is visible.
> >>
> >>
> >> there is no  element on the page with the same id and name
> >>
> >> regards,
> >> angrez
> >>
> >>     Sathya Shankar
> >>
> >>     Angrez Singh wrote:
> >>
> >>     > Hi,
> >>     >
> >>     > While using watir to compose a mail(Yahoo mail), I came across a
> >>     text
> >>     > area with style set to display:none:
> >>     >
> >>     > <textarea name="Body" id="bodyfield"
> >>     style="display:none"></textarea>
> >>     >
> >>     > According to CSS tutorials at w3schools:
> >>     >
> >>     > http://www.w3schools.com/css/pr_class_display.asp
> >>     >
> >>     > The value none means that element will not be displayed. But the
> >>     > element is visible in the browser and when I try to enter text
> >>     in to
> >>     > it following exception comes:
> >>     >
> >>     >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `method_missing':
> >>     focus
> >>     >(WIN32OLERuntimeError)
> >>     >
> >>     >    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. from
> >>     >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `set'
> >>     >
> >>     >Now how to enter value in such a textarea?
> >>     >
> >>     >
> >>     >Regards,
> >>     >Angrez
> >>
> >
> >
>
>
> --
> Sathya Shankar M G
> Software Testing Engineer
> Qantom Software
> http://www.qantom.com
> Ph : 26799269 Xtn. 123
> sip : satti at sip411.com
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>



--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"

Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/31ec4b69/attachment.html 


More information about the Wtr-general mailing list