向大神们请教,appium1.6.3 下 引导页的滑动没有效果,脚本和 log 如下,谢谢了🙏!

# 引导页滑屏处理
    def getSize():
        x = self.driver.get_window_size()['width']
        y = self.driver.get_window_size()['height']
        return (x, y)
    def swipLeft(t):
        l = getSize()
        x1 = int(l[0] * 0.75)
        y1 = int(l[1] * 0.5)
        x2 = int(l[0] * 0.05)
        self.driver.swipe(x1, y1, x2, y1, t)
    swipLeft(5000)
    sleep(3)
[HTTP] <-- GET /wd/hub/session/ac98620d-0167-4d9a-8a82-94a292bd8209/window/current/size 200 131 ms - 98 
[HTTP] --> GET /wd/hub/session/ac98620d-0167-4d9a-8a82-94a292bd8209/window/current/size {}
[debug] [MJSONWP] Calling AppiumDriver.getWindowSize() with args: ["current","ac98620d-0167-4d9a-8a82-94a292bd8209"]
[debug] [XCUITest] Executing command 'getWindowSize'
[debug] [JSONWP Proxy] Proxying [GET /window/current/size] to [GET http://localhost:8100/session/67E76085-E6BF-424A-93CD-598A62F81EAB/window/current/size] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n  \"value\" : {\n    \"width\" : 375,\n    \"height\" : 667\n  },\n  \"sessionId\" : \"67E76085-E6BF-424A-93CD-598A62F81EAB\",\n  \"status\" : 0\n}"
[debug] [MJSONWP] Responding to client with driver.getWindowSize() result: {"width":375,"height":667}
[HTTP] <-- GET /wd/hub/session/ac98620d-0167-4d9a-8a82-94a292bd8209/window/current/size 200 130 ms - 98 
[HTTP] --> POST /wd/hub/session/ac98620d-0167-4d9a-8a82-94a292bd8209/touch/perform {"sessionId":"ac98620d-0167-4d9a-8a82-94a292bd8209","actions":[{"action":"press","options":{"y":333,"x":281}},{"action":"wait","options":{"ms":5000}},{"action":"moveTo","options":{"y":333,"x":18}},{"action":"release","options":{}}]}
[debug] [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{"action":"press","options":{"y":333,"x":281}},{"action":"wait","options":{"ms":5000}},{"action":"moveTo","options":{"y":333,"x":18}},{"action":"release","options":{}}],"ac98620d-0167-4d9a-8a82-94a292bd8209"]
[debug] [XCUITest] Executing command 'performTouch'
[debug] [XCUITest] Received the following touch action: press-wait-moveTo-release
[debug] [JSONWP Proxy] Proxying [POST /uiaTarget/0/dragfromtoforduration] to [POST http://localhost:8100/session/67E76085-E6BF-424A-93CD-598A62F81EAB/uiaTarget/0/dragfromtoforduration] with body: {"fromX":281,"fromY":333,"toX":299,"toY":666,"duration":5}
[debug] [JSONWP Proxy] Got response with status 200: {"value":{},"sessionId":"67E76085-E6BF-424A-93CD-598A62F81EAB","status":0}
[debug] [MJSONWP] Responding to client with driver.performTouch() result: {}


↙↙↙阅读原文可查看相关链接,并与作者交流