标签:bsp sleep and info bdr 自动 http 返回 查看
1.如下图定位"去看看"这个按钮的坐标,可以看到右侧bonds属性:[374,831][654,906]
2.点右上角"搜索"按钮,查看bonds属性:[615,52][690,146]
参考案例
# coding:utf-8 from appium import webdriver from time import sleep desired_caps = { ‘platformName‘: ‘Android‘, ‘deviceName‘: ‘127.0.0.1:62001‘, ‘platformVersion‘: ‘4.4.2‘, ‘appPackage‘: ‘com.baidu.yuedu‘, ‘appActivity‘: ‘com.baidu.yuedu.splash.SplashActivity‘ } driver = webdriver.Remote(‘http://127.0.0.1:4723/wd/hub‘, desired_caps) sleep(5) # 点弹出框去看看 driver.tap([(374, 831), (654, 906)], 500) # 返回上一页 driver.back() sleep(2) # 点右上角搜素按钮 driver.tap([(615, 52), (690, 146)], 500)
标签:bsp sleep and info bdr 自动 http 返回 查看
原文地址:https://www.cnblogs.com/Mr-ZY/p/11697470.html