Skip to main content

AutoPC

基于Windows的跨平台的UI自动化框架,适用于游戏和App(Click here for the English version)

快速开始

  • 各种运行: AutoPC提供了跨平台的API,包括安装应用、图像识别、模拟输入等。 基于图像识别技术定位UI元素,你无需嵌入任何代码即可进行自动化。

  • 扩展性: AutoPC提供了命令行和python接口,可以很容易地在大规模设备集群上运行。

安装

使用 pip 安装AutoPC框架

pip install -U autopc

在Windows系统下操作Android,需要检查设备是否已经通过ADB连接

# windows系统
adb devices

文档

完整的AutoPC文档请看 readthedocs。

例子

AutoPC提供与平台无关的的python API,让你的自动化代码可以运行Windows上,操作不同平台的应用。

  1. 使用 connect_device 来连接任意Android设备或者Windows窗口。
  2. 使用 模拟操作 的API来自动化你的游戏或者App。
from autopc.basic.basic_airtest import *

# 通过ADB连接本地Android设备
BasicAirtest.auto_setup("Android")
# 启动APP
BasicAirtest.adb_start_app("package_name_of_your_apk")
# 点击屏幕的图片
BasicAirtest.touch(Template("image_of_a_button.png"))
# 从图片1滑动到图片2
BasicAirtest.swipe(Template("slide_start.png"), Template("slide_end.png"))

更详细的说明请看 AutoPC Python API 文档 或者直接看 API代码 。

贡献代码

欢迎大家fork和提pull requests。

致谢

感谢以下仓库让AutoPC变得更好:

关于我

个人开发者

Metadata

Release files for autopc 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autopc 1.0.1
File Size Uploaded
autopc-1.0.1.tar.gz 17.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autopc 1.0.1
File Interpreter ABI Platform
autopc-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 33.9 kB

Release files / autopc-1.0.1.tar.gz

Download URL autopc-1.0.1.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
30d151eb77f9fdcf9961c2303028feecc5fdc897075a62526ccc98fcee8852c2
BLAKE2b-256 checksum
How to use checksums
8f75b0dff01e4aba73c5ca1230669f40ffa6f2f641cc69c35ff8c9aff1bcbc73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.13

Release files / autopc-1.0.1-py3-none-any.whl

Download URL autopc-1.0.1-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d7b2a0f0772ecd1835a011052685dd8031cdb65a0bd979ebd0544011a6bad60
BLAKE2b-256 checksum
How to use checksums
6aa645324a40c7452168df4c1fd3a02c5289e46ccacc18f58a15af62ebc5715e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page