I've been thinking that it would be nice to have simple scrolling API.

```ruby
browser.scroll_to.top               # scrolls to the top of the page
browser.scroll_to.center            # scrolls to the top of the page
browser.scroll_to.bottom            # scrolls to the bottom of the page
browser.scroll_to.offset(100, -100) # scrolls to offset in pixesl
browser.div.scroll_to.text          # scrolls to the element and returns its 
text
```

There page scrolling can be implemented using Javascript `window.scrollTo`.
We can also support horizontal scrolling, though I am not sure how such API 
should look like.

Element scrolling can be done using WebDriver's 
`Element#location_once_scrolled_into_view`.

---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/206
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to