def single_tap(marionette, wait_for_condition, expected):
    testAction = marionette.absolute_url("testAction.html")
    marionette.navigate(testAction)
    button = marionette.find_element("id", "button1")
    action = Actions(marionette)
    action.tap(button).perform()
    wait_for_condition(lambda m: expected in m.execute_script("return document.getElementById('button1').innerHTML;"))
def single_tap(marionette, wait_for_condition, expected):
    testAction = marionette.absolute_url("testAction.html")
    marionette.navigate(testAction)
    button = marionette.find_element("id", "button1")
    action = Actions(marionette)
    action.tap(button).perform()
    wait_for_condition(lambda m: expected in m.execute_script("return document.getElementById('button1').innerHTML;"))
Example #3
0
 def test_touch(self):
     testTouch = self.marionette.absolute_url("testAction.html")
     self.marionette.navigate(testTouch)
     self.marionette.send_mouse_event(False)
     button = self.marionette.find_element("id", "mozMouse")
     action = Actions(self.marionette)
     action.tap(button).perform()
     time.sleep(10)
     self.assertEqual("TouchEnd", self.marionette.execute_script("return document.getElementById('mozMouse').innerHTML;"))
 def test_touch(self):
     testTouch = self.marionette.absolute_url("testAction.html")
     self.marionette.navigate(testTouch)
     self.marionette.send_mouse_event(False)
     button = self.marionette.find_element("id", "mozMouse")
     action = Actions(self.marionette)
     action.tap(button).perform()
     time.sleep(10)
     self.assertEqual(
         "TouchEnd",
         self.marionette.execute_script(
             "return document.getElementById('mozMouse').innerHTML;"))