Appium自动测试框架常用API

1.元素定位

find_element()#可以进行二次封装
find_elements()
find_element_by_id()
find_elements_by_id()
find_element_by_class_name()
find_elements_by_class_name()
......

2.屏幕操作

scroll() #滚动
swipe() #滑动
drag_and_drop() #长按拖动
tap() #点击

get_screenshot_as_png() #截屏
 

3.安装,卸载,关闭

is_app_installed('appNmae') #判断是否安装,返回值为false,ture
install_app() #安装
launch_app() #启动

close_app() #关闭
remove_app() #卸载

4.其他常用

flick() #滑动
current_activity #打印当前的activty
wait_activity() #等待响应,如果没有响应返回fales
background_app() #退到后台
原文地址:https://www.cnblogs.com/misslin/p/6731199.html