def chain(marionette, wait_for_condition, expected1, expected2):
    testAction = marionette.absolute_url("testAction.html")
    marionette.navigate(testAction)
    marionette.set_search_timeout(15000)
    action = Actions(marionette)
    button1 = marionette.find_element("id", "button1")
    action.press(button1).perform()
    button2 = marionette.find_element("id", "delayed")
    wait_for_condition(lambda m: expected1 in m.execute_script("return document.getElementById('button1').innerHTML;"))
    action.move(button2).release().perform()
    wait_for_condition(lambda m: expected2 in m.execute_script("return document.getElementById('delayed').innerHTML;"))
Exemplo n.º 2
0
 def test_chain(self):
     testTouch = self.marionette.absolute_url("testAction.html")
     self.marionette.navigate(testTouch)
     action = Actions(self.marionette)
     button1 = self.marionette.find_element("id", "mozLinkCopy2")
     action.press(button1).perform()
     button2 = self.marionette.find_element("id", "delayed")
     time.sleep(5)
     action.move(button2).release().perform()
     time.sleep(15)
     self.assertEqual("End", self.marionette.execute_script("return document.getElementById('delayed').innerHTML;"))
Exemplo n.º 3
0
def chain(marionette, wait_for_condition, expected1, expected2):
    testAction = marionette.absolute_url("testAction.html")
    marionette.navigate(testAction)
    marionette.set_search_timeout(15000)
    action = Actions(marionette)
    button1 = marionette.find_element("id", "button1")
    action.press(button1).perform()
    button2 = marionette.find_element("id", "delayed")
    wait_for_condition(lambda m: expected1 in m.execute_script("return document.getElementById('button1').innerHTML;"))
    action.move(button2).release().perform()
    wait_for_condition(lambda m: expected2 in m.execute_script("return document.getElementById('delayed').innerHTML;"))
 def test_chain(self):
     testTouch = self.marionette.absolute_url("testAction.html")
     self.marionette.navigate(testTouch)
     action = Actions(self.marionette)
     button1 = self.marionette.find_element("id", "mozLinkCopy2")
     action.press(button1).perform()
     button2 = self.marionette.find_element("id", "delayed")
     time.sleep(5)
     action.move(button2).release().perform()
     time.sleep(15)
     self.assertEqual(
         "End",
         self.marionette.execute_script(
             "return document.getElementById('delayed').innerHTML;"))