当前位置:   article > 正文

Python命令汇总:雷电模拟器_python 雷电指令dnconsole

python 雷电指令dnconsole

Python命令汇总:雷电模拟器



写在前面

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


一、模拟器参数操作

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

二、模拟器应用操作

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

三、模拟器模拟操作

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

参考网站名称

雷电模拟器命令操作合集

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/489990
推荐阅读
相关标签
  

闽ICP备14008679号