Automation test for phone
Project description
README: UIAutomator2 Dump Screen Project
Mục đích
Dự án này sử dụng uiautomator2 để kết nối từ laptop tới server trên điện thoại Android, thực hiện dump màn hình và trả dữ liệu về laptop.
Sơ đồ kết nối
- Laptop: Gửi yêu cầu dump màn hình qua
uiautomator2. - Điện thoại (Server UIAutomator2): Nhận yêu cầu, thực hiện dump màn hình và gửi kết quả về laptop.
Cài đặt
- Cài đặt
qa_phone_automationtrên laptop:
pip install -U qaautomation
- Kết nối điện thoại với
qaautomation:
import uiautomator2 as u2
device = u2.connect('device_ip')
print(device.info)
Cách sử dụng
from coreapp import get_xml_content
xml_data = get_xml_content('device_id', type='uiautomator')
print(xml_data)
Lưu ý
- Điện thoại cần bật chế độ nhà phát triển và cấp quyền ADB.
- Đảm bảo
uiautomator2server đang chạy trên điện thoại.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qa_automation_phone-0.1.0.tar.gz.
File metadata
- Download URL: qa_automation_phone-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d284b9a00c7498500b0cf79c6098c85ed06663f04f2e00d59e946b628f54454e
|
|
| MD5 |
b78e80fcd063b93de04baf4b2d6f4b8c
|
|
| BLAKE2b-256 |
d82f96a68b2c3e2e697597fce157fddfded784f28fe39a285a7e128a07d42f9d
|
File details
Details for the file qa_automation_phone-0.1.0-py3-none-any.whl.
File metadata
- Download URL: qa_automation_phone-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66ebcb8a33f915f92b52897ec358cdaf063cd5cbcb153c501fa610721c3875d7
|
|
| MD5 |
6af35445ad604fde8fc04390171aafa3
|
|
| BLAKE2b-256 |
e227a408cb4e7e706ec7f7cf2c2716e8e667de265ac90877d818f4d03e220fd2
|