Skip to content

Instantly share code, notes, and snippets.

@AaronMT
Created November 28, 2012 22:16
Show Gist options
  • Save AaronMT/4165079 to your computer and use it in GitHub Desktop.
Save AaronMT/4165079 to your computer and use it in GitHub Desktop.
_homescreen_frame_locator = ('css selector', 'iframe.homescreen')
_homescreen_landing_locator = ('id', 'landing-page')
def _swipe_to_everything_me(self):
hs_frame = self.marionette.find_element(*self._homescreen_frame_locator)
self.marionette.switch_to_frame(hs_frame)
landing_element = self.marionette.find_element(*self._homescreen_landing_locator)
landing_element_x_centre = int(landing_element.size['width']/2)
landing_element_y_centre = int(landing_element.size['height']/2)
self.marionette.flick(landing_element, landing_element_x_centre, landing_element_y_centre, 300, 0, 800)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment