oh that advice has to be worth a lot more than you just valued it at..
at least a $0.02 if not $0.1 when adjusting for inflation. And your
point is well taken (along with a big facepalm on my part)  Not
intentionally causing dependencies that break a large number of tests
is a good rule to live by, and your approach is a bit more work and
would require specific tests for objects being in view, (but that's a
good thing, it documents that part of the story, especially if using
doc by example) instead of having it be sort of implied and tested by
inference instead of via a specific test.   But this is a good example
of where killing two birds with one stone seems good at first, but has
a large downside (big numbers of blocked tests) caused by cutting a
few corners.

On Oct 11, 10:31 am, Cliff Cyphers <[email protected]> wrote:
> >> Watir::Element#scroll_to unless unless Watir::Element#in_viewable_area?
>
> > The main difficulty I have with this is that I've worked on a number
> > of pages where part of the design requirements were that everything
> > had to pretty much fit onto a specific default page size such as
> > 1024x768, and if something was 'not in view' then I wanted the script
> > to fail.  In that case having the script 'break' if something was
> > outside that area is not a behavior I'd want to change.
>
> It's still a good idea to be able to scroll to the required element,
> although auto scrolling may be desired or unwanted depending on usage.
>  In either case, you can always test your apps for such requirements
> by:
>
> 1.  Resize browser to spec's dimensions.
> 2.  Call Browser::Element.in_viewable_area?
>
> But other test which require clicking on the element's link would
> still pass if the element was automatically scrolled to.  Why break
> multiple test because the element isn't in a viewable area?  Have the
> one test that check the speck as you mentioned and allow all of your
> additional test which navigate the links and test other functionality
> do their job, to find low hanging fruit faster.
>
> just my 0.0001 cents

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to