appium ui App 自动化 popupwindow控件,定位不到页面元素的解决方法

1.坐标定位(通过UiAutomator Viewer工具定位坐标):
# x1/y1和 x2/y2分别为起/止点的坐标,time为时间,单位为ms
driver.swipe(x1, y1, x2, y2, time)

2.定位不到的元素可以使用driver.tap()触发点击事件
# 模拟手指点击(最多五个手指),time为时间,单位为ms
driver.tap([(x1, y1), (x2, y2)], time)
driver.tap([(704,1816),(808,1920)], 10)

猜你喜欢

转载自blog.csdn.net/Joyce_xiaobaibai/article/details/121102084