I am trying to scroll a web page to find and click on a content that is lazily loaded when the page is scrolled. I am using following command
@browser = Watir::new :firefox
When /^deal (\d+) is loaded$/ do |id|
(0..5).each do |click|
will scroll down the page 200 pixels along the y axix.
See here for documentation of the method: