Appium [已解决] appium ios 坐标点击位置不准确?

小明 · 2014年06月26日 · 最后由 Wang 回复于 2015年07月08日 · 1750 次阅读

运行环境:mac
模拟器版本:7.1
appium 版本:1.1
语言:nodejs
使用的接口:

execute("mobile: tap", { "tapCount": 1, "touchCount": 1, "duration": 0.5, "x": 46, "y": 206 })

实际点击效果不是在所写坐标处。

解决办法:

.waitForElementByXPath('//UIAApplication[1]')
        .then(function (el) {
          var action = new wd.TouchAction(browser);
          action
            .tap({el: el, x: 53, y: 167})
            .release();
          return browser.performTouchAction(action);
        })
共收到 1 条回复 时间 点赞

Thank you so much for the sharing!!!

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册