[Wtr-general] Inputing text into a <textarea> that is containedwithin a <div>

Charley Baker charley.baker at gmail.com
Mon Oct 2 15:26:50 EDT 2006


Chris,

  I took some liberties with your test and checked the files into svn.
Added id to iframes_test.html as you mentioned, changed the test to id
strings, and added it to frame_test.rb. Hope you don't mind and thanks
for the prodding. The test now fails with
  1) Error:
test_iframes_id(TC_IFrames):
NoMethodError: undefined method `invoke' for nil:NilClass
    C:/dev/watir/watir/unittests/../watir.rb:2544:in `locate'
    C:/dev/watir/watir/unittests/../watir.rb:2528:in `each'
    C:/dev/watir/watir/unittests/../watir.rb:2528:in `locate'
    C:/dev/watir/watir/unittests/../watir.rb:2562:in `initialize'
    (eval):3:in `new'
    (eval):3:in `frame'
    C:/dev/watir/watir/unittests/frame_test.rb:106:in `test_iframes_id'

A clean house is a good thing, haven't had one of those since having kids.

-Charley

On 10/2/06, Chris McMahon <christopher.mcmahon at gmail.com> wrote:
>
>
> >
> > > I was going to do this (it's either that or clean my house), but
> > > there's already a frames test by id in
>
> Now that I have a clean house...
>
> Alter iframes_test.html like so:
>
> <iframe src = iframeTest1.html name = senderFrame id = sf width = 300
> height = 300>
>
> now the test:
>
>
> def test_iframes_id
> #VALIDATE THAT WE CAN GET THERE AT ALL
>  x = $ie.frame(:index,1).button(:name,'sendIt').click
> assert_equal("",x)
>
> #VALIDATE THAT WE CAN GET THERE VIA id
> x = $ie.frame(:id,sf).button(:name,'sendIt').click
> assert_equal("",x)
> end
>
> produces
>
>
>   1) Error:
> test_iframes_id(TC_show_frames):
> NameError: undefined local variable or method `sf' for
> #<TC_show_frames:0x2837320>
>     frame_test.rb:145:in `test_iframes_id'
>
>
> It's a little different format, but it works nice.  I like assert_equal.
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>


More information about the Wtr-general mailing list