Comments (3)
我给你个例子看下合不合适,因为连续移动这种不是必须的,所以没有集成到框架核心里。
假设你是用摇杆进行移动的,且地图平坦无遮挡,而且也集成了poco-sdk
points = [(100, 100), (100, 200), (200, 250)] # 地图上的点
directions = [(p[i + 1][0] - p[i][0], p[i + 1][0] - p[i][0]) for i in range(len(points) - 1)] # 连续移动的向量
for v in directions:
poco('摇杆').swipe(v, duration=v[0] * v[0] + v[1] * v[1]) # 距离越远持续时间越长
以上是一个很简单的例子,实际情况地形可能很复杂我不确定,可参考示例代码的写法。
from airtest.
@gegelaopiaoke 可以贴一下你的连续移动是怎么写的吗?
from airtest.
@gegelaopiaoke 你好,目前版本已经提供了MotionEvent,可以自己封装任意操作
https://github.com/AirtestProject/Airtest/blob/master/playground/android_motionevents.py
from airtest.
Related Issues (20)
- 执行完double_click()之后在报告里没有那个点击后的红圈显示
- 运行脚本启动Chrome闪退,Chrome 121.0.6167.140
- 在安卓真机上执行 keyevent( "volumeUp" ) 或 keyevent( "volumeDown" ) 无效
- airtest是否引用了psutil
- 建议移除psutil
- airtest link will automatically disconnect after working for a period of time. How to solve this problem HOT 1
- 安装完最新的appium的wda,airtest无法连接IOS HOT 1
- poco服务启动慢 HOT 2
- 如果想利用AI 配合 airtest框架实现 自动编写UI测试用例 请教下有思路吗?
- poco,text获取元素失败 HOT 3
- iOS 使用start_app报错
- airtest自动安装的urllib3库, 需要旧版 (比如1.26.17) 才能通过uid连接ios手机
- airtest ios连接的api: connect_device无法连接多台ios HOT 4
- window7 airtest 脚本编辑器窗黑屏 HOT 2
- 请问如何开启cuda加速
- [功能增强,不是bug] 关于支持app内webview的操作和录制 HOT 2
- 在Android V(Android 15)的手机上运行airtest进行UI测试,log中有yosemite 报错
- 安卓13(小米居多)总是报是否允许xxx访问所有设备日志,如何关闭? HOT 1
- Airtest怎么连接一个设备里面的多个屏幕中的一个呢?
- 获取剪贴板信息失败
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from airtest.