If all else fails you can use :index  usually to identify an element
as the nth occurance of that element on the page.   Personally I
REALLY hate doing that because it's one of the most fragile things you
can do other than using specific x,y coordinates and almost always
results in code that breaks the moment someone adds another feature to
the page, or even does a simple cosmetic re-design of the site.   I
will push back if it's at all possible for the devs to make changes
that allow the site to be more testable.


  rant = Chuck::Soapbox(new)
This is one of those situations where you are really better off
getting just a tiny bit of cooperation from the site developers to
make the site more testable.  it's possible you could also make it
more accessable at the same time... as it stands anyone with an
accessability issue, (such as impared vision) trying to use a screen-
reader tool, is going to have a hard time with that website.  Adding
something like a :label attribute to the button could not only make
the site more testable, it would make it more accessable as well.

testability adds business value because it means you get more bang for
your testing buck.. the site can either be tested more cheaply, or
more completely, or some combination of both.  It can also increase
the duration over which the work you are doing will be useful because
the automation will be less fragile and require less maintance when
the site changes.

Accessability adds business value because it increases the number of
potential customers who can utilize the site (e.g. make purchases if
it's web commerce), and in some cases (if your client is governmental,
or it's an internal tool) may be required by regulations, standards,
or things like the ADA

If the dev team claims to be using agile development methods then they
should be receptive to this kind of feedback, and willing to discuss
what can be done to improve the site in this regard.  This type of
thing can potentially be added to the code with a fairly minimal
effort, with low risk to code stability, and a good amount of
business value returned in exchange.

Any org that won't at least listen to the feedback, and discuss if a
solution is possible is disfunctional..  seek to change that, if you
can't, then seek a better opportunity..  if this work is being done
under contract then make sure you're not on the hook to maintain what
you've built, because without a little help from the client, you may
be forced to write code that is inherently fragile (because you have
no other alternative) and thus looking at a lot of 'free' maintance
down the road that will eat all the profits from the contract.

end


On Mar 10, 5:25 am, bwaybandit <lenridge...@gmail.com> wrote:
> can u post the html that describes your button?
>
> On Mar 10, 6:45 am, Nagu <nagman...@gmail.com> wrote:
>
>
>
> > I have a button in my application and its having 2 properties/
> > attributes on click and type.the values are onclick:this.value=check
> > (this.form.selections) and type:button.So how can i click this
> > button.I wrote a code has like this ie.button(:onclick,
> > "this.value=check(this.form.selections)").click but its not working
> > pls let me know if anyone knows- 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