Ejemplo n.º 1
0
 def tap_element_from_system_app(self, element=None, add_statusbar_height=False):
     # Workaround for bug 1109213, where tapping on the button inside the app itself
     # makes Marionette spew out NoSuchWindowException errors
     x = element.rect['x'] + element.rect['width']//2
     y = element.rect['y'] + element.rect['height']//2
     from gaiatest.apps.system.app import System
     system = System(self.marionette)
     if add_statusbar_height:
       y = y + system.status_bar.height
     system.tap(x, y)
Ejemplo n.º 2
0
 def tap_element_from_system_app(self, element=None, add_statusbar_height=False):
     # Workaround for bug 1109213, where tapping on the button inside the app itself
     # makes Marionette spew out NoSuchWindowException errors
     x = element.rect['x'] + element.rect['width']//2
     y = element.rect['y'] + element.rect['height']//2
     from gaiatest.apps.system.app import System
     system = System(self.marionette)
     if add_statusbar_height:
       y = y + system.status_bar.height
     system.tap(x, y)
Ejemplo n.º 3
0
Archivo: base.py Proyecto: ssainz/gaia
    def tap_element_from_system_app(self, element=None, add_statusbar_height=False, x=None, y=None):        # Workaround for bug 1109213, where tapping on the button inside the app itself
        # makes Marionette spew out NoSuchWindowException errors
        cx = element.rect['x']
        cy = element.rect['y']
        cx += element.rect['width']//2 if x is None else x
        cy += element.rect['height']//2 if y is None else y

        from gaiatest.apps.system.app import System
        system = System(self.marionette)
        if add_statusbar_height:
          cy = cy + system.status_bar.height
        system.tap(cx, cy)
Ejemplo n.º 4
0
    def tap_element_from_system_app(self, element=None, add_statusbar_height=False, x=None, y=None):        # Workaround for bug 1109213, where tapping on the button inside the app itself
        # makes Marionette spew out NoSuchWindowException errors
        cx = element.rect['x']
        cy = element.rect['y']
        cx += element.rect['width']//2 if x is None else x
        cy += element.rect['height']//2 if y is None else y

        from gaiatest.apps.system.app import System
        system = System(self.marionette)
        if add_statusbar_height:
          cy = cy + system.status_bar.height
        system.tap(cx, cy)