Can you just use the "contains_text" or "match" (on the page or on the
actual html using the "html" method) with a regular expression and
extract text you want to be stored in the array?  I'm pretty new to
ruby and Watir so it might not be suitable for what you are doing.

Cheers,
Daniel.

On 27/03/06, Rodrigo Julian Martin <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi,
>
>
>
> Chris McMahon, you wrote me:
>
>
>
> >> Ps:  I'm working on a new method for finding objects accordly of their
>
> >> properties and values (passed as parameters) Someone is doing
>
> >> something similar? I'm studying the def show… of watir.rb, just as
>
> >> Chris McMahon suggest me…
>
>
>
> > Probably easiest just to use them:
>
>
>
> > C:\Documents and Settings\cmcmahon>irb
>
> > irb(main):001:0> require 'watir'
>
> > => true
>
> > irb(main):002:0> include Watir
>
> > => Object
>
> > irb(main):003:0> ie = IE.attach(:title, /Google/)
> ......................................................
>
> > irb(main):007:0> ie.show_frames
>
> > there are 0 frames
>
> > => 0..-1
>
> > irb(main):008:0>
>
> > .....................................
>
> > irb(main):008:0> ie.show_forms
>
> > There are 1 forms
>
> > Form name: f
>
> >        id:
>
> >    method: get
>
> >    action: /search
>
> > => 0..0
>
> > irb(main):009:0>
>
> > ................................................
>
> > irb(main):009:0> ie.show_images
>
> > image: name:
>
> >          id:
>
> >         src:
>
> >       index: 1
>
> > image: name:
>
> >          id:
>
> >         src:
> http://www.google.com/intl/en/images/logo.gif
>
> >       index: 2
>
> > => nil
>
> > irb(main):010:0>
>
> > ..................................
>
> > etc. etc.
>
>
>
>
>
> Thanks for the reply, but i don't get how can I use that commands for what I
> want to do.
>
>
>
> I will tell you exactly what I'm triying to do.
>
>
>
> With a script, I load data in a web in order to sign up a user. When I press
> the submit button, there are two possibilities:
>
>
>
> 1) All the data is correct. It show's me a confirmation page.
>
>
>
> or
>
>
>
> 2) Some data is incorrect. Dynamic Objects appears (named Item(...), where
> ... is an integer) with the classname: "error" and
>
>
>
> a "value" containing the error text.
>
>
>
> What i'm trying to do is to store all this dynamic objects into an object
> array, in order to analyze them and show some
>
> reports of their values. I was thinking that I could take the code of
> watir.rb, specifically from the def show_all_objects and start there.
>
> I'm a new user of watir and also of ruby, but I guess I could do it.. Maybe
> some of you guys have already done it or is in
>
>
>
> the way to...
>
>
>
> I'll post my code when it's done or in progress.
>
>
>
> Thanks in Advance!
>
>
>
> Rodrigo Julian Martin.
> _______________________________________________
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>

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

Reply via email to