Python命令汇总:雷电模拟器

Python命令汇总:雷电模拟器


文章目录

  • Python命令汇总:雷电模拟器
  • 写在前面
  • 一、模拟器参数操作
  • 二、模拟器应用操作
  • 三、模拟器模拟操作
  • `参考网站名称`
    • 雷电模拟器命令操作合集


写在前面

使用目的:雷电模拟器库函数调用(调用时注意函数前缀


一、模拟器参数操作

  1. 添加模拟器
add(name: str)
  1. 获取安装包列表
get_package_list(index: int) -> list
  1. 检测是否安装指定的应用
has_install(index: int, package: str)
  1. 获取模拟器列表
results = Dnconsole.get_list()
  1. 获取正在运行的模拟器列表
results = Dnconsole.list_running()
  1. 检测指定序号的模拟器是否正在运行
results = Dnconsole.is_running(0)
  1. 安装、下载、启动、停止 应用程序
install(index: int, path: str)
uninstall(index: int, package: str)
invokeapp(index: int, package: str)
stopapp(index: int, package: str)
  1. 设置自动旋转
auto_rate(index: int, auto_rate: bool = False)

二、模拟器应用操作

  1. 启动模拟器
launch(index: int)
  1. 关闭模拟器
quit(index: int)
  1. 获取当前activity名称
get_activity_name(index: int)
  1. 等待某个activity出现
wait_activity(index: int, activity: str, timeout: int) -> bool
  1. 输入文字
input_text(index: int, text: str)
  1. 找图
find_pic(screen: str, template: str, threshold: float)
  1. 等待某个图片出现
wait_picture(index: int, timeout: int, template: str) -> bool

三、模拟器模拟操作

  1. 点击或者长按某点
touch(index: int, x: int, y: int, delay: int = 0)
  1. 滑动
swipe(index, coordinate_leftup: tuple, coordinate_rightdown: tuple, delay: int = 0)

参考网站名称

雷电模拟器命令操作合集

你可能感兴趣的:(Python学习,python,开发语言)