请确保您的代码中使用的是最新版本的Appium库,如果不是,请升级到最新版本。
检查您的代码是否正确使用Swipe和Scroll方法。在AWS设备农场上,您需要使用TouchAction类来执行滑动或滚动操作,如下所示:
from appium.webdriver.common.touch_action import TouchAction
#向上滑动 action = TouchAction(driver) start_x = 500 start_y = 1000 end_x = 500 end_y = 500 action.press(x=start_x,y=start_y).wait(2000).move_to(x=end_x,y=end_y).release().perform()
#向下滑动 action = TouchAction(driver) start_x = 500 start_y = 600 end_x = 500 end_y = 1000 action.press(x=start_x,y=start_y).wait(2000).move_to(x=end_x,y=end_y).release().perform()
#向左滑动 action = TouchAction(driver) start_x = 800 start_y = 1000 end_x = 200 end_y = 1000 action.press(x=start_x,y=start_y).wait(2000).move_to(x=end_x,y=end_y).release().perform()
#向右滑动 action = TouchAction(driver) start_x = 200 start_y = 1000 end_x = 800 end_y = 1000 action.press(x=start_x,y=start_y).wait(2000).move_to(x=end_x,y=end_y).release().perform()