祝社区发展越来越好!!!
最后一步:完成接口和 UI 自动化
什么时候招有经验的呢?
#8 楼 @tongxiaoxing cucumber 是可以自动生成报告的
我十一在家直接进行了 factory reset,然后连系统都删了,才明白原来 MacBook 跟手机不是一样玩的。
你不是说这个不是最新的吗?
解决了 还是用的 swipe start_x: 200, start_y: 200, end_x: 200, end_y: 400, duration: 2000
这里的 duration 单位是 ms 只要时间够长就好了
@eurekasaber 我还尝试了 swipe start_x: 200, start_y: 200, end_x: 400, end_y: 200, duration: 2
log 也是成功的:
info: [debug] Pushing command to appium work queue: ["swipe",{"startX":200,"startY":200,"endX":400,"endY":200,"steps":0}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"swipe","params":{"startX":200,"startY":200,"endX":400,"endY":200,"steps":0}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: swipe
info: [debug] [BOOTSTRAP] [debug] Display bounds: [0,0][768,1184]
info: [debug] [BOOTSTRAP] [debug] Display bounds: [0,0][768,1184]
info: [debug] [BOOTSTRAP] [debug] Swiping from [x=200.0, y=200.0] to [x=400.0, y=200.0] with steps: 0
info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"06731e8a-641d-4fbc-904d-c1ebfaec8d05"}
info: <-- POST /wd/hub/session/06731e8a-641d-4fbc-904d-c1ebfaec8d05/touch/perform 200 22.435 ms - 76 {"status":0,"value":true,"sessionId":"06731e8a-641d-4fbc-904d-c1ebfaec8d05"}
info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
info: --> GET /wd/hub/session/06731e8a-641d-4fbc-904d-c1ebfaec8d05/source {}
info: [debug] Pushing command to appium work queue: ["source",{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"source","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: source
只是看到了屏幕闪了下
@eurekasaber 尝试了 swipe start_x: 50, start_y: 200, end_x: 50, end_y: 400, duration: 2
我在模拟器上没有看到任何变化,我想要下滑但是感觉好像在某个 unit 上横向移动了,unit 上横向移动是没有反应的
log 中显示是成功的:
info: [debug] Pushing command to appium work queue: ["swipe",{"startX":50,"startY":200,"endX":50,"endY":400,"steps":0}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"swipe","params":{"startX":50,"startY":200,"endX":50,"endY":400,"steps":0}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: swipe
info: [debug] [BOOTSTRAP] [debug] Display bounds: [0,0][768,1184]
info: [debug] [BOOTSTRAP] [debug] Display bounds: [0,0][768,1184]
info: [debug] [BOOTSTRAP] [debug] Swiping from [x=50.0, y=200.0] to [x=50.0, y=400.0] with steps: 0
info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"23cea7bb-f191-4c8e-b645-c45c9ca717d9"}
info: <-- POST /wd/hub/session/23cea7bb-f191-4c8e-b645-c45c9ca717d9/touch/perform 200 36.777 ms - 76 {"status":0,"value":true,"sessionId":"23cea7bb-f191-4c8e-b645-c45c9ca717d9"}
info: --> GET /wd/hub/session/23cea7bb-f191-4c8e-b645-c45c9ca717d9/source {}
info: [debug] Pushing command to appium work queue: ["source",{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"source","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: source
#1 楼 @chenhengjie123 现有的方法里面我没有找到现成的可以下滑的方法 所以需要自己封装 但是太弱了 能详细说说封装的吗?