class Selenium::WebDriver::Interactions::Scroll

def encode

def encode
  {'type' => type.to_s,
   'duration' => @duration.to_i,
   'x' => @x_offset,
   'y' => @y_offset,
   'deltaX' => @delta_x,
   'deltaY' => @delta_y,
   'origin' => @origin.is_a?(Element) ? @origin : @origin.to_s}
end