On Oct 11, 9:07 am, Cliff Cyphers <[email protected]> wrote:
> Hello Watir users
>
 1.  The underlying selenium-webdriver can not perform an action on an
> element if it isn't in the viewable area on the browser.  Actions such
> as click, text, html, etc on such elements will fail under this
> condition.

> Seehttps://github.com/ccyphers/qa_robusta/blob/master/qa_observer/lib/wa...
> for a current implementation to handle these points.  Note, personally
> I think it might be best to make a slight update to this
> implementation, for the element not in the viewable area.  All method
> calls to Watir::Element which require the element to be in view, could
> first:
>
> 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.

So if we make a change like this, then we might need some kind of a
global setting that would be used to enable or disable the automagical
scrolling of stuff into view.  That or is there a .viewable? method
that can be called to perform that check?  (yes, I'm being lazy and
asking you for info I could go look up)

-- 
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