parsers are predictive I guess.
I have to constantly remind myself when I see an error from Watir that it
could not find some element that maybe the page wasn't there at all much
less the element.
It's like  saying "Elevator doesn't work"
One might check for precondition "Has the building been built?", "Has the
Elevator been installed?"

marekj
Watirloo: Semantic Page Objects in UseCases
http://github.com/marekj/watirloo/



On Fri, Mar 13, 2009 at 2:10 PM, Chuck van der Linden <sqa...@gmail.com>wrote:

>
> Well in a sense it did.   it told you that the close paren was
> unexpected.
>
> Meaning in this case that it expected something along the lines of
>  (parm1, param2) and didn't get that..  it found the closeing paren
> before it found the second parameter (which would have followed a
> comma, since the comma was missing, it treated everything as a single
> parameter, and hence didn't expect to find the paren where it did.
>
> takes a bit of experience to understand why something is 'unexpected'
> but generally it means 'I expected to find something else, before I
> found the unexpected thing'  the tricky part is then looking in front
> of the 'unexpected' item to try and figure out what's missing that
> should have been there.
>
>  (ruby is not unique in that kind of error being somewhat cryptic..
> virtually all languages I've encountered suffer from this, there's
> just so far a compliler/processor can go in terms of figuring out what
> you were 'trying to do' which is pretty much needed in order to give
> good errors in a situation like this
>
> On Mar 12, 2:09 pm, maximore <hri...@gmail.com> wrote:
> >  actually  it work flawlessly with out any  error message after
> > inserting the  comma. I  wish there was a way for  Ruby to indicate
> > some sense of direction like the error message above......... maybe
> > bceuz I am new and don't know how to work it out
> >
> > On Mar 12, 2:54 pm, Tiffany Fodor <tcfo...@comcast.net> wrote:
> >
> >
> >
> > > Sorry - my bad - i had a typo in my example.  You need a separator
> > > between the parameter and the attribute.  You can use either a comma:
> >
> > > list_options = ie.select_list(:name, 'my_list').getAllContents
> >
> > > or =>
> >
> > > list_options = ie.select_list(:name => 'my_list').getAllContents
> >
> > > -Tiffany
> >
> > > On Mar 12, 1:33 pm, maximore <hri...@gmail.com> wrote:
> >
> > > >  I added  code and run  program this was the error message that I
> > > > git .estCases_AgiileIteration1.rb:198: syntax error, unexpected ')',
> > > > expecting kEND When code is removed form program code error message
> go
> > > > away .
> >
> > > >     List_options=ie.select_list(:name
> > > > "securityQuestion").getAllContents
> >
> > > > On Mar 12, 11:32 am, Tiffany Fodor <tcfo...@comcast.net> wrote:
> >
> > > > > Give this a try:
> >
> > > > > list_options = ie.select_list(:name 'my_list').getAllContents
>  #gives
> > > > > you an array of the options
> >
> > > > > number_of_options = list_options.length  #array method length gives
> > > > > you the number of elements in the array
> >
> > > > > Hope this helps!
> >
> > > > > -Tiffany
> >
> > > > > On Mar 12, 10:11 am, maximore <hri...@gmail.com> wrote:
> >
> > > > > >  hello  I want to  count the number of  option on a pull down
> > > > > > menu  ....
> > > > > >  how can i go about  doing  just this  in ruby?  I know there is
> a
> > > > > > way of going about this just don't know how .
> >
> > > > > >  thanks- Hide quoted text -
> >
> > - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to