当在robotframework中使用appium时,由于AppiumLibrary中没有手势操作方法,所以需要自定义一下方法
步骤:
1、在AppiumLibrary源码中找到这个类class _TouchKeywords(KeywordGroup):
2、在类中添加如下方法:
#自定义methods def draw_gesture_one_time(self, *args): driver = self._current_application() TouchAction(driver).press(args[0]).move_to(args[0]).move_to(args[3]).wait(150).move_to(args[6]).wait(150).move_to(args[8]).wait(150).release().perform()