• xpath 使用误区,请进 at 2016年05月24日

    学习

  • Appium Python API 中文版 By-HZJ at 2016年05月23日

    收藏留名

  • 学习留名

  • 学习

  • Appium+python 框架 (二) at 2016年05月23日

    留名学习

  • 学习

  • 又学习了

  • #40 楼 @xiaoli 知道问题了,TouchAction 需要传一个参数

  • #9 楼 @weamylady 已经解决,多谢

  • def test_gestureUnlock(self):
    #time.sleep(5)
    el1 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[10]")
    print el1
    time.sleep(2)
    el2 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[13]")
    print el2
    time.sleep(2)
    el3 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[16]")
    print el3
    time.sleep(2)
    el4 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[17]")
    print el4
    time.sleep(2)
    Gesture = TouchAction().press(el1).move_to(el2).move_to(el3).move_to(el4).release()
    print Gesture
    time.sleep(2)
    Gesture.perform()

    请问 手势密码这一段有什么问题啊 一直提示如下错误:

    File "/Library/Python/2.7/site-packages/appium/webdriver/common/touch_action.py", line 94, in perform
    self._driver.execute(Command.TOUCH_ACTION, params)
    AttributeError: 'NoneType' object has no attribute 'execute'

  • #4 楼 @april46 def test_gestureUnlock(self):
    #time.sleep(5)
    el1 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[10]")
    print el1
    time.sleep(2)
    el2 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[13]")
    print el2
    time.sleep(2)
    el3 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[16]")
    print el3
    time.sleep(2)
    el4 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[17]")
    print el4
    time.sleep(2)
    Gesture = TouchAction().press(el1).move_to(el2).move_to(el3).move_to(el4).release()
    print Gesture
    time.sleep(2)
    Gesture.perform()

    请问 手势密码这一段有什么问题啊 一直提示如下错误:

    File "/Library/Python/2.7/site-packages/appium/webdriver/common/touch_action.py", line 94, in perform
    self._driver.execute(Command.TOUCH_ACTION, params)
    AttributeError: 'NoneType' object has no attribute 'execute'

  • def test_gestureUnlock(self):
    #time.sleep(5)
    el1 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[10]")
    print el1
    time.sleep(2)
    el2 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[13]")
    print el2
    time.sleep(2)
    el3 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[16]")
    print el3
    time.sleep(2)
    el4 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[17]")
    print el4
    time.sleep(2)
    Gesture = TouchAction().press(el1).move_to(el2).move_to(el3).move_to(el4).release()
    print Gesture
    time.sleep(2)
    Gesture.perform()

    请问 手势密码这一段有什么问题啊 一直提示如下错误:

    File "/Library/Python/2.7/site-packages/appium/webdriver/common/touch_action.py", line 94, in perform
    self._driver.execute(Command.TOUCH_ACTION, params)
    AttributeError: 'NoneType' object has no attribute 'execute'

  • def test_gestureUnlock(self):
    #time.sleep(5)
    el1 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[10]")
    print el1
    time.sleep(2)
    el2 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[13]")
    print el2
    time.sleep(2)
    el3 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[16]")
    print el3
    time.sleep(2)
    el4 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[17]")
    print el4
    time.sleep(2)
    Gesture = TouchAction().press(el1).move_to(el2).move_to(el3).move_to(el4).release()
    print Gesture
    time.sleep(2)
    Gesture.perform()

    请问 手势密码这一段有什么问题啊 一直提示如下错误:

    File "/Library/Python/2.7/site-packages/appium/webdriver/common/touch_action.py", line 94, in perform
    self._driver.execute(Command.TOUCH_ACTION, params)
    AttributeError: 'NoneType' object has no attribute 'execute'
    #6 楼 @weamylady

  • def test_gestureUnlock(self):
    #time.sleep(5)
    el1 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[10]")
    print el1
    time.sleep(2)
    el2 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[13]")
    print el2
    time.sleep(2)
    el3 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[16]")
    print el3
    time.sleep(2)
    el4 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[17]")
    print el4
    time.sleep(2)
    Gesture = TouchAction().press(el1).move_to(el2).move_to(el3).move_to(el4).release()
    print Gesture
    time.sleep(2)
    Gesture.perform()

    请问 手势密码这一段有什么问题啊 一直提示如下错误:

    File "/Library/Python/2.7/site-packages/appium/webdriver/common/touch_action.py", line 94, in perform
    self._driver.execute(Command.TOUCH_ACTION, params)
    AttributeError: 'NoneType' object has no attribute 'execute'

  • def test_gestureUnlock(self):
    #time.sleep(5)
    el1 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[10]")
    print el1
    time.sleep(2)
    el2 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[13]")
    print el2
    time.sleep(2)
    el3 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[16]")
    print el3
    time.sleep(2)
    el4 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[17]")
    print el4
    time.sleep(2)
    Gesture = TouchAction().press(el1).move_to(el2).move_to(el3).move_to(el4).release()
    print Gesture
    time.sleep(2)
    Gesture.perform()

    请问 手势密码这一段有什么问题啊 一直提示如下错误:

    File "/Library/Python/2.7/site-packages/appium/webdriver/common/touch_action.py", line 94, in perform
    self._driver.execute(Command.TOUCH_ACTION, params)
    AttributeError: 'NoneType' object has no attribute 'execute'

  • def test_gestureUnlock(self):
    #time.sleep(5)
    el1 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[10]")
    print el1
    time.sleep(2)
    el2 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[13]")
    print el2
    time.sleep(2)
    el3 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[16]")
    print el3
    time.sleep(2)
    el4 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[17]")
    print el4
    time.sleep(2)
    Gesture = TouchAction().press(el1).move_to(el2).move_to(el3).move_to(el4).release()
    print Gesture
    time.sleep(2)
    Gesture.perform()

    请问 手势密码这一段有什么问题啊 一直提示如下错误:

    File "/Library/Python/2.7/site-packages/appium/webdriver/common/touch_action.py", line 94, in perform
    self._driver.execute(Command.TOUCH_ACTION, params)
    AttributeError: 'NoneType' object has no attribute 'execute'

  • def test_gestureUnlock(self):
    #time.sleep(5)
    el1 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[10]")
    print el1
    time.sleep(2)
    el2 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[13]")
    print el2
    time.sleep(2)
    el3 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[16]")
    print el3
    time.sleep(2)
    el4 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[17]")
    print el4
    time.sleep(2)
    Gesture = TouchAction().press(el1).move_to(el2).move_to(el3).move_to(el4).release()
    print Gesture
    time.sleep(2)
    Gesture.perform()

    请问 手势密码这一段有什么问题啊 一直提示如下错误:

    File "/Library/Python/2.7/site-packages/appium/webdriver/common/touch_action.py", line 94, in perform
    self._driver.execute(Command.TOUCH_ACTION, params)
    AttributeError: 'NoneType' object has no attribute 'execute'

  • def test_gestureUnlock(self):
    #time.sleep(5)
    el1 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[10]")
    print el1
    time.sleep(2)
    el2 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[13]")
    print el2
    time.sleep(2)
    el3 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[16]")
    print el3
    time.sleep(2)
    el4 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[17]")
    print el4
    time.sleep(2)
    Gesture = TouchAction().press(el1).move_to(el2).move_to(el3).move_to(el4).release()
    print Gesture
    time.sleep(2)
    Gesture.perform()

    请问 手势密码这一段有什么问题啊 一直提示如下错误:

    File "/Library/Python/2.7/site-packages/appium/webdriver/common/touch_action.py", line 94, in perform
    self._driver.execute(Command.TOUCH_ACTION, params)
    AttributeError: 'NoneType' object has no attribute 'execute'

  • def test_gestureUnlock(self):
    #time.sleep(5)
    el1 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[10]")
    print el1
    time.sleep(2)
    el2 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[13]")
    print el2
    time.sleep(2)
    el3 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[16]")
    print el3
    time.sleep(2)
    el4 = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[17]")
    print el4
    time.sleep(2)
    Gesture = TouchAction().press(el1).move_to(el2).move_to(el3).move_to(el4).release()
    print Gesture
    time.sleep(2)
    Gesture.perform()

    请问 手势密码这一段有什么问题啊 一直提示如下错误:

    File "/Library/Python/2.7/site-packages/appium/webdriver/common/touch_action.py", line 94, in perform
    self._driver.execute(Command.TOUCH_ACTION, params)
    AttributeError: 'NoneType' object has no attribute 'execute'

  • #2 楼 @lylyliuyu 请问 python 执行后为何一直提示 AttributeError: 'NoneType' object has no attribute 'execute'