1.TouchAction类
-
from appium.webdriver.common.touch_action import TouchAction # 导入类
-
TouchAction(driver).方法.perform()
-
方法
-
轻敲 tap(element,x,y)
-
按下 press(element,x,y)
-
等待 wait(ms)
-
抬起 release()
-
移动 move_to(element,x,y)
-
执行 perform()
-
2.app的api操作
-
发送键到设备
-
driver.keyevent(keycode)
-
-
手机截屏---用在发现bug时候
-
driver.get_screenshot_as_file(文件路径/文件名)
-
appium支持png格式
-
3.tap---模拟手指触摸
-
tap()
4.webview操作---重要重要重要
4.1识别webview页面---H5页面
-
在截屏工具中,如果是webview页面,class属性值=android.webkit.WebView