當前位置: 首頁>>代碼示例>>Python>>正文


Python MultiAction.perform方法代碼示例

本文整理匯總了Python中appium.webdriver.common.multi_action.MultiAction.perform方法的典型用法代碼示例。如果您正苦於以下問題:Python MultiAction.perform方法的具體用法?Python MultiAction.perform怎麽用?Python MultiAction.perform使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在appium.webdriver.common.multi_action.MultiAction的用法示例。


在下文中一共展示了MultiAction.perform方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_parallel_actions

# 需要導入模塊: from appium.webdriver.common.multi_action import MultiAction [as 別名]
# 或者: from appium.webdriver.common.multi_action.MultiAction import perform [as 別名]
    def test_parallel_actions(self):
        el1 = self.driver.find_element_by_name('Content')
        el2 = self.driver.find_element_by_name('Animation')
        self.driver.scroll(el1, el2)

        el = self.driver.find_element_by_name('Views')
        action = TouchAction(self.driver)
        action.tap(el).perform()

        el = self.driver.find_element_by_name('Expandable Lists')
        # simulate a swipe/scroll
        action.press(el).move_to(x=100, y=-1000).release().perform()

        el = self.driver.find_element_by_name('Splitting Touches across Views')
        action.tap(el).perform()

        els = self.driver.find_elements_by_class_name('android.widget.ListView')
        a1 = TouchAction()
        a1.press(els[0]) \
            .move_to(x=10, y=0).move_to(x=10, y=-75).move_to(x=10, y=-600).release()

        a2 = TouchAction()
        a2.press(els[1]) \
            .move_to(x=10, y=10).move_to(x=10, y=-300).move_to(x=10, y=-600).release()

        ma = MultiAction(self.driver, els[0])
        ma.add(a1, a2)
        ma.perform();
開發者ID:vigossjjj,項目名稱:python-client,代碼行數:30,代碼來源:multi_action_tests.py

示例2: test_zoom_image

# 需要導入模塊: from appium.webdriver.common.multi_action import MultiAction [as 別名]
# 或者: from appium.webdriver.common.multi_action.MultiAction import perform [as 別名]
    def test_zoom_image(self):
        # 查找元素 操作  校驗
        self.driver.find_element_by_xpath("//UIAButton[@label='Gesture']").click()
        self.driver.find_element_by_accessibility_id("Image (Zoom and Pinch)").click()

        image = self.driver.find_element_by_accessibility_id("imageScrollView")
        location = image.location

        # 獲取image的坐標,為(20,90)
        print location
        x = location["x"]
        y = location["y"]
        print x
        print y

        # 獲取image的寬和高,分別為300,300
        size = image.size
        print size

        a1 = TouchAction()
        a1.press(x=x, y=y).move_to(x=x, y=y+x).release()
        a2 = TouchAction()
        a2.press(x=x, y=y).move_to(x=x, y=y-x).release()

        # MultiAction(self.driver).add(a1, a2).perform()這個寫法是錯誤的,必須分3行,不能合並到1行!

        multi_touch = MultiAction(self.driver)
        multi_touch.add(a1, a2)
        multi_touch.perform()
        sleep(3)
開發者ID:cutebabyhua,項目名稱:appium_ios,代碼行數:32,代碼來源:l6_personal_zoom_image.py

示例3: tap

# 需要導入模塊: from appium.webdriver.common.multi_action import MultiAction [as 別名]
# 或者: from appium.webdriver.common.multi_action.MultiAction import perform [as 別名]
    def tap(self, positions, duration=None):
        """Taps on an particular place with up to five fingers, holding for a
        certain time

        :Args:
         - positions - an array of tuples representing the x/y coordinates of
         the fingers to tap. Length can be up to five.
         - duration - (optional) length of time to tap, in ms

        :Usage:
            driver.tap([(100, 20), (100, 60), (100, 100)], 500)
        """
        if len(positions) == 1:
            action = TouchAction(self)
            x = positions[0][0]
            y = positions[0][1]
            if duration:
                action.long_press(x=x, y=y, duration=duration).release()
            else:
                action.tap(x=x, y=y)
            action.perform()
        else:
            ma = MultiAction(self)
            for position in positions:
                x = position[0]
                y = position[1]
                action = TouchAction(self)
                if duration:
                    action.long_press(x=x, y=y, duration=duration).release()
                else:
                    action.press(x=x, y=y).release()
                ma.add(action)

            ma.perform()
        return self
開發者ID:ZezHok,項目名稱:MyFirsAutoTest,代碼行數:37,代碼來源:webdriver.py

示例4: test_services_map_multi_touch

# 需要導入模塊: from appium.webdriver.common.multi_action import MultiAction [as 別名]
# 或者: from appium.webdriver.common.multi_action.MultiAction import perform [as 別名]
 def test_services_map_multi_touch(self):
     enter_menu(self)
     self.driver.find_element_by_android_uiautomator('textContains("Map")').click()
     el = self.driver.find_element_by_accessibility_id('Google Map')
     els = el.find_elements_by_class_name('android.view.View')
     if len(els) > 3:
         action0 = TouchAction().tap(els[0])
         action1 = TouchAction().tap(els[1])
         action2 = TouchAction().tap(els[2])
         ma = MultiAction(self.driver, els[0])
         ma.add(action0, action1, action2)
         ma.perform()
     self.driver.back()
     self.driver.back()
開發者ID:jkondrat,項目名稱:org.rescue.RefugeeInfoApp,代碼行數:16,代碼來源:android_country_city_selected.py

示例5: test_by_multiaction

# 需要導入模塊: from appium.webdriver.common.multi_action import MultiAction [as 別名]
# 或者: from appium.webdriver.common.multi_action.MultiAction import perform [as 別名]
	def test_by_multiaction(self):
		print "By multiaction"
		self.method_name = sys._getframe().f_code.co_name
		# self.driver.find_element_by_accessibility_id("Image (Zoom and Pinch)").click()
		self.driver.find_element_by_accessibility_id("Test Gesture").click()
		# 選取兩個點
		action1 = TouchAction(self.driver)
		action1.press(x=87, y=150).move_to(x=45, y=150).release()
		action2 = TouchAction(self.driver)
		action2.press(x=120, y=150).move_to(x=150, y=150).release()
		# action2.press(x=200, y=150).move_to(x=280, y=150).release() # 無法執行
		ma = MultiAction(self.driver)
		ma.add(action1, action2)
		ma.perform()
		sleep(5)
開發者ID:huajie1,項目名稱:appium_ios,代碼行數:17,代碼來源:l6_personal_zoom_image.py

示例6: test_multitouch

# 需要導入模塊: from appium.webdriver.common.multi_action import MultiAction [as 別名]
# 或者: from appium.webdriver.common.multi_action.MultiAction import perform [as 別名]
 def test_multitouch(self):
     driver = self.driver
     driver.implicitly_wait(90)
     
     action1 = TouchAction(driver)
     action1.long_press(None,1181,665).wait(500).release()
     
     action2 = TouchAction(driver)
     action2.long_press(None,838,1104).wait(500).release()
     
     action3 = TouchAction(driver)
     action3.long_press(None,588,1652).wait(500).release()
     
     multi = MultiAction(driver)
     multi.add(action1,action2,action3)
     multi.perform()
開發者ID:vijaynirmal,項目名稱:AppiumJenkinsIntegration,代碼行數:18,代碼來源:MultoTouch.py

示例7: test_actions_with_waits

# 需要導入模塊: from appium.webdriver.common.multi_action import MultiAction [as 別名]
# 或者: from appium.webdriver.common.multi_action.MultiAction import perform [as 別名]
    def test_actions_with_waits(self):
        el1 = self.driver.find_element_by_accessibility_id('Content')
        el2 = self.driver.find_element_by_accessibility_id('Animation')
        self.driver.scroll(el1, el2)

        el = self.driver.find_element_by_accessibility_id('Views')
        action = TouchAction(self.driver)
        action.tap(el).perform()

        # simulate a swipe/scroll
        el = wait_for_element(self.driver, MobileBy.ACCESSIBILITY_ID, 'Expandable Lists')
        action.press(el).move_to(x=100, y=-1000).release().perform()
        el = self.driver.find_element_by_accessibility_id('Layouts')
        action.press(el).move_to(x=100, y=-1000).release().perform()

        el = self.driver.find_element_by_accessibility_id('Splitting Touches across Views')
        action.tap(el).perform()

        wait_for_element(self.driver, MobileBy.CLASS_NAME, 'android.widget.ListView')
        els = self.driver.find_elements_by_class_name('android.widget.ListView')
        a1 = TouchAction()
        a1.press(els[0]) \
            .move_to(x=10, y=0) \
            .move_to(x=10, y=-75) \
            .wait(1000) \
            .move_to(x=10, y=-600) \
            .release()

        a2 = TouchAction()
        a2.press(els[1]) \
            .move_to(x=10, y=10) \
            .move_to(x=10, y=-300) \
            .wait(500) \
            .move_to(x=10, y=-600) \
            .release()

        ma = MultiAction(self.driver, els[0])
        ma.add(a1, a2)
        ma.perform()
開發者ID:appium,項目名稱:python-client,代碼行數:41,代碼來源:multi_action_tests.py

示例8: test_smiley_face

# 需要導入模塊: from appium.webdriver.common.multi_action import MultiAction [as 別名]
# 或者: from appium.webdriver.common.multi_action.MultiAction import perform [as 別名]
    def test_smiley_face(self):
        # just for the fun of it.
        # this doesn't really assert anything.
        self.driver.find_element_by_accessibility_id('Graphics').click()

        els = self.driver.find_elements_by_class_name('android.widget.TextView')
        self.driver.scroll(els[len(els)-1], els[0])

        el = None
        try:
            el = self.driver.find_element_by_accessibility_id('Touch Paint')
        except Exception as e:
            els = self.driver.find_elements_by_class_name('android.widget.TextView')
            self.driver.scroll(els[len(els)-1], els[0])

        if el is None:
            el = self.driver.find_element_by_accessibility_id('Touch Paint')

        el.click()

        # paint
        e1 = TouchAction()
        e1.press(x=150, y=100).release()

        e2 = TouchAction()
        e2.press(x=250, y=100).release()

        smile = TouchAction()
        smile.press(x=110, y=200) \
            .move_to(x=1, y=1) \
            .move_to(x=1, y=1) \
            .move_to(x=1, y=1) \
            .move_to(x=1, y=1) \
            .move_to(x=1, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=-1) \
            .move_to(x=5, y=-1) \
            .move_to(x=5, y=-1) \
            .move_to(x=5, y=-1) \
            .move_to(x=5, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=1, y=-1) \
            .move_to(x=1, y=-1) \
            .move_to(x=1, y=-1) \
            .move_to(x=1, y=-1) \
            .move_to(x=1, y=-1)
        smile.release()

        ma = MultiAction(self.driver)
        ma.add(e1, e2, smile)
        ma.perform()

        # so you can see it
        sleep(10)
開發者ID:ankcrimson,項目名稱:Practice,代碼行數:97,代碼來源:android_complex.py

示例9: test_smiley_face

# 需要導入模塊: from appium.webdriver.common.multi_action import MultiAction [as 別名]
# 或者: from appium.webdriver.common.multi_action.MultiAction import perform [as 別名]
    def test_smiley_face(self):
        # just for the fun of it.
        # this doesn't really assert anything.
        # paint
        eye1 = TouchAction()
        eye1.press(x=150, y=100).release()

        eye2 = TouchAction()
        eye2.press(x=250, y=100).release()

        smile = TouchAction()
        smile.press(x=110, y=200) \
            .move_to(x=1, y=1) \
            .move_to(x=1, y=1) \
            .move_to(x=1, y=1) \
            .move_to(x=1, y=1) \
            .move_to(x=1, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=-1) \
            .move_to(x=5, y=-1) \
            .move_to(x=5, y=-1) \
            .move_to(x=5, y=-1) \
            .move_to(x=5, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=1, y=-1) \
            .move_to(x=1, y=-1) \
            .move_to(x=1, y=-1) \
            .move_to(x=1, y=-1) \
            .move_to(x=1, y=-1)
        smile.release()

        ma = MultiAction(self.driver)
        ma.add(eye1, eye2, smile)
        ma.perform()

        # so you can see it
        sleep(10)
開發者ID:12301146-hongchaodai,項目名稱:sample-code,代碼行數:80,代碼來源:android_gestures_sauce.py

示例10: test_scroll

# 需要導入模塊: from appium.webdriver.common.multi_action import MultiAction [as 別名]
# 或者: from appium.webdriver.common.multi_action.MultiAction import perform [as 別名]
    def test_scroll(self):
        sleep(2)
        els = self.driver.find_element_by_class_name('android.widget.ImageButton')
        els.click()
        sleep(10)
        
        
        
        btn = self.driver.find_element_by_class_name('android.webkit.WebView')
        btn.click()


        sleep(10)

        webview = self.driver.contexts
        print ('>>%s<<' % len(webview))
        contexts = self.driver.contexts
        self.driver.switch_to.context('WEBVIEW')

        e1 = TouchAction()
        e1.press(x=150, y=100).release()

        e2 = TouchAction()
        e2.press(x=250, y=100).release()


        smile = TouchAction()
        smile.press(x=400, y=800) \
            .move_to(x=-1, y=1) \
            .move_to(x=-1, y=1) \
            .move_to(x=-1, y=1) \
            .move_to(x=-1, y=1) \
            .move_to(x=-1, y=1) \
            .move_to(x=-2, y=1) \
            .move_to(x=-2, y=1) \
            .move_to(x=-2, y=1) \
            .move_to(x=-2, y=1) \
            .move_to(x=-2, y=1) \
            .move_to(x=-3, y=1) \
            .move_to(x=-3, y=1) \
            .move_to(x=-3, y=1) \
            .move_to(x=-3, y=1) \
            .move_to(x=-3, y=1) \
            .move_to(x=-4, y=1) \
            .move_to(x=-4, y=1) \
            .move_to(x=-4, y=1) \
            .move_to(x=-4, y=1) \
            .move_to(x=-4, y=1) \
            .move_to(x=-5, y=1) \
            .move_to(x=-5, y=1) \
            .move_to(x=-5, y=1) \
            .move_to(x=-5, y=1) \
            .move_to(x=-5, y=1) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=-1) \
            .move_to(x=-5, y=-1) \
            .move_to(x=-5, y=-1) \
            .move_to(x=-5, y=-1) \
            .move_to(x=-5, y=-1) \
            .move_to(x=-4, y=-1) \
            .move_to(x=-4, y=-1) \
            .move_to(x=-4, y=-1) \
            .move_to(x=-4, y=-1) \
            .move_to(x=-4, y=-1) \
            .move_to(x=-3, y=-1) \
            .move_to(x=-3, y=-1) \
            .move_to(x=-3, y=-1) \
            .move_to(x=-3, y=-1) \
            .move_to(x=-3, y=-1) \
            .move_to(x=-2, y=-1) \
            .move_to(x=-2, y=-1) \
            .move_to(x=-2, y=-1) \
            .move_to(x=-2, y=-1) \
            .move_to(x=-2, y=-1) \
            .move_to(x=-1, y=-1) \
            .move_to(x=-1, y=-1) \
            .move_to(x=-1, y=-1) \
            .move_to(x=-1, y=-1) \
            .move_to(x=-1, y=-1)
        smile.release()
        ma = MultiAction(self.driver)
        ma.add(e1,e2,smile)
        ma.perform()
        sleep(10)
開發者ID:ankcrimson,項目名稱:NikeAutomation,代碼行數:93,代碼來源:android_selendroid.py

示例11: test_scroll

# 需要導入模塊: from appium.webdriver.common.multi_action import MultiAction [as 別名]
# 或者: from appium.webdriver.common.multi_action.MultiAction import perform [as 別名]

#.........這裏部分代碼省略.........
        els = self.driver.find_element_by_class_name('android.widget.ImageButton')
        els.click()
        sleep(10)
        
        
        
        #btn = self.driver.find_element_by_class_name('android.webkit.WebView')
        #btn.click()


        #
        selfview = self.driver.contexts[0]
        webview = self.driver.contexts[1]
        print ('>>%s<<' % webview)
        #contexts = self.driver.contexts

        self.driver.switch_to.context(webview)
        self.driver.get("http://m.nike.com/us/en_us/pd/air-zoom-pegasus-32-running-shoe/pid-10294427/pgid-10266840")

        sleep(10)

        print ('>>%s<<' % selfview)
        self.driver.switch_to.context(selfview)
        



        print ('Now trying TouchAction')
        e1 = TouchAction()
        e1.press(x=150, y=100).release()

        e2 = TouchAction()
        e2.press(x=250, y=100).release()


        smile = TouchAction()
        smile.press(x=400, y=800) \
            .move_to(x=-1, y=1) \
            .move_to(x=-1, y=1) \
            .move_to(x=-1, y=1) \
            .move_to(x=-1, y=1) \
            .move_to(x=-1, y=1) \
            .move_to(x=-2, y=1) \
            .move_to(x=-2, y=1) \
            .move_to(x=-2, y=1) \
            .move_to(x=-2, y=1) \
            .move_to(x=-2, y=1) \
            .move_to(x=-3, y=1) \
            .move_to(x=-3, y=1) \
            .move_to(x=-3, y=1) \
            .move_to(x=-3, y=1) \
            .move_to(x=-3, y=1) \
            .move_to(x=-4, y=1) \
            .move_to(x=-4, y=1) \
            .move_to(x=-4, y=1) \
            .move_to(x=-4, y=1) \
            .move_to(x=-4, y=1) \
            .move_to(x=-5, y=1) \
            .move_to(x=-5, y=1) \
            .move_to(x=-5, y=1) \
            .move_to(x=-5, y=1) \
            .move_to(x=-5, y=1) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=0) \
            .move_to(x=-5, y=-1) \
            .move_to(x=-5, y=-1) \
            .move_to(x=-5, y=-1) \
            .move_to(x=-5, y=-1) \
            .move_to(x=-5, y=-1) \
            .move_to(x=-4, y=-1) \
            .move_to(x=-4, y=-1) \
            .move_to(x=-4, y=-1) \
            .move_to(x=-4, y=-1) \
            .move_to(x=-4, y=-1) \
            .move_to(x=-3, y=-1) \
            .move_to(x=-3, y=-1) \
            .move_to(x=-3, y=-1) \
            .move_to(x=-3, y=-1) \
            .move_to(x=-3, y=-1) \
            .move_to(x=-2, y=-1) \
            .move_to(x=-2, y=-1) \
            .move_to(x=-2, y=-1) \
            .move_to(x=-2, y=-1) \
            .move_to(x=-2, y=-1) \
            .move_to(x=-1, y=-1) \
            .move_to(x=-1, y=-1) \
            .move_to(x=-1, y=-1) \
            .move_to(x=-1, y=-1) \
            .move_to(x=-1, y=-1)
        smile.release()
        ma = MultiAction(self.driver)
        ma.add(e1,e2,smile)
        ma.perform()
        sleep(10)
開發者ID:ankcrimson,項目名稱:NikeAutomation,代碼行數:104,代碼來源:android_selendroid_v2.py

示例12: test_find_elements

# 需要導入模塊: from appium.webdriver.common.multi_action import MultiAction [as 別名]
# 或者: from appium.webdriver.common.multi_action.MultiAction import perform [as 別名]
    def test_find_elements(self):
        # pause a moment, so xml generation can occur
        sleep(2)

        self.driver.get("http://m.nike.com/us/en_us/pd/air-zoom-pegasus-32-running-shoe/pid-10294427/pgid-10266840")
        #els = self.driver.find_elements_by_xpath('//android.widget.TextView')
        #Eself.assertEqual('API Demos', els[0].text)

        #el = self.driver.find_element_by_xpath('//android.widget.TextView[contains(@text, "Animat")]')
        #self.assertEqual('Animation', el.text)

        #el = self.driver.find_element_by_accessibility_id("App")
        #el.click()

        #els = self.driver.find_elements_by_android_uiautomator('new UiSelector().clickable(true)')
        # there are more, but at least 10 visible
        #self.assertLess(10, len(els))
        # the list includes 2 before the main visible elements
        #self.assertEqual('Action Bar', els[2].text)

        #els = self.driver.find_elements_by_xpath('//android.widget.TextView')
        #self.assertLess(10, len(els))
        #self.assertEqual('Action Bar', els[1].text)
        smile = TouchAction()
        smile.press(x=110, y=200) \
            .move_to(x=1, y=1) \
            .move_to(x=1, y=1) \
            .move_to(x=1, y=1) \
            .move_to(x=1, y=1) \
            .move_to(x=1, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=2, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=3, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=4, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=1) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=0) \
            .move_to(x=5, y=-1) \
            .move_to(x=5, y=-1) \
            .move_to(x=5, y=-1) \
            .move_to(x=5, y=-1) \
            .move_to(x=5, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=4, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=3, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=2, y=-1) \
            .move_to(x=1, y=-1) \
            .move_to(x=1, y=-1) \
            .move_to(x=1, y=-1) \
            .move_to(x=1, y=-1) \
            .move_to(x=1, y=-1)
        smile.release()

        ma = MultiAction(self.driver)
        ma.add(smile)
        ma.perform()

        # so you can see it
        sleep(10)
開發者ID:ankcrimson,項目名稱:NikeAutomation,代碼行數:93,代碼來源:browser_gestures.py


注:本文中的appium.webdriver.common.multi_action.MultiAction.perform方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。