AirtestProject / AirtestProject/AirtestIDE
python+airtest,应用层已经旋转成了横屏显示,但系统底层是竖屏坐标系,airtest获取屏幕错乱导致坐标点击异常
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 236
- Forks
- 40
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
(请尽量按照下面提示内容填写,有助于我们快速定位和解决问题,感谢配合。**否则直接关闭。**)
**(重要!根据问题类型选择分类)**
* 图像识别相关问题 -> https://github.com/AirtestProject/Airtest/issues
**详细描述问题bug:**
bug描述
应用层是横屏显示,但是系统底层显示的却是是竖屏坐标系,导致airtest获取屏幕错乱,直接导致执行命令时图片识别度极低,坐标点击偏离。
{'width': 1080, 'height': 1920, 'density': 1.75, 'orientation': 1, 'rotation': 90, 'max_x': 1080, 'max_y': 1920}
当前分辨率: (1920, 1080)
设备方向: 1
物理分辨率:1080x1920
**复现步骤:**
**python 版本:** `python3.79`
**操作系统:** `Windows7 64bit`
**设备信息:**
mumu模拟器 v5.25.2
**其他相关信息补充**
使用python3.79 安装的airtest+pocoui
**日志**
D:\LDXY01\venv\Scripts\python.exe D:\LDXY01\xx.py
no cmdline args
[23:11:55][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 get-state
[23:11:55][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 wait-for-device
[23:11:55][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getprop ro.build.version.sdk
[23:11:55][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys activity top
[23:11:55][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys package com.netease.open.pocoservice
[23:11:55][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 forward --no-rebind tcp:32535 tcp:10080
[23:11:55][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 forward --no-rebind tcp:38135 tcp:10081
[23:11:55][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell am start -n com.netease.open.pocoservice/.TestActivity
[23:11:55][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell am instrument -w -e debug false -e class com.netease.open.pocoservice.InstrumentedTestAsLauncher com.netease.open.pocoservice/androidx.test.runner.AndroidJUnitRunner
start...
[23:11:57][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 get-state
[23:11:57][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 wait-for-device
[23:11:57][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getprop ro.build.version.sdk
[23:11:57][WARNING] Device:127.0.0.1:7555 updated ->
[23:11:57][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys SurfaceFlinger
[23:11:57][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys input
[23:11:57][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys SurfaceFlinger
[23:11:57][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell wm size
[23:11:58][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys input
[23:11:58][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getprop ro.sf.lcd_density
[23:11:58][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys SurfaceFlinger
[23:11:58][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys input
[23:11:58][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getevent -p
[23:11:58][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell wm size
完整的display_info内容: {'width': 1080, 'height': 1920, 'density': 1.75, 'orientation': 1, 'rotation': 90, 'max_x': 1080, 'max_y': 1920}
[23:11:58][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getprop ro.sf.lcd_density
[23:11:58][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys SurfaceFlinger
[23:11:58][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys input
[23:11:58][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getevent -p
[23:11:59][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell wm size
当前分辨率: (1920, 1080)
设备方向: 1
[23:11:59][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell wm density
[23:11:59][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 forward --remove tcp:32535
物理分辨率: Physical size: 1080x1920
屏幕密度: Physical density: 280
[23:11:59][DEBUG] D:\AndroidSDK\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 forward --remove tcp:38135
进程已结束,退出代码为 0
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.