1. Problem reappearance: when learning appium framework and using uiautomatorviewer to locate Android App controls, directly selecting [device screenshot] will report an error:
2. Solution:
Create a new bat file with the following contents:
adb shell uiautomator dump /sdcard/screen.uix adb pull /sdcard/screen.uix D:/uiscreen/screen.uix adb shell screencap -p /sdcard/screen.png adb pull /sdcard/screen.png D:/uiscreen/screen.png
In fact, these commands can also be directly input in CMD, but they need to be input every time, which is more troublesome. All commands can be written into bat files and run directly to obtain interface information.
3. Select the path of the picture and uix file in uiautomatorviewer:
My frame is too small. I can’t click the path of the second uix at all. The solution is to press the tab key, locate the button to select the file, and then enter can select it normally.
4. Then you can load the interface and locate the elements normally.
Read More:
- How to Solve Opencv Reads Video Error: cv2.error
- [Solved] Pyinstaller packaged exe error: “failed to execute script XXX”
- Python synthesizes multiple pictures into one video
- Python+OpenCV: How to Use Background Subtraction Methods
- [Solved] ADB shell error: no devices/emulators found
- [Solved] AttributeError: ‘DataFrame‘ object has no attribute ‘tolist‘
- Python Error: [9880] failed to execute script [How to Solve]
- [Solved] MAC terminal Use ‘CONDA activate’ and ‘CONDA install package_ Error reported by name’ Error
- [Solved] YOLOv4 Error: Layer before convolutional layer must output image.: No error
- Python Import Error: SystemError: Parent module ‘‘ not loaded, cannot perform relative import
- VScode Run CONDA environment Error [How to Solve]
- [Solved] RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors
- [Solved] Pyinstaller Package and Run Error: RuntimeError: Unable to open/read ui device
- [Solved] Python Project Import Module Error: ModuleNotFoundError
- Python USES the PO design pattern for automated testing
- [Solved] Huawei OBS Python SDK download picture error: nosuchkey
- [Solved] R Error: Python module tensorflow.keras was not found.
- [Solved] Windows10 Pycharm Use Virtual Environment Error: Cannot set up a python SDK
- How to Solve Error: RuntimeError CUDA out of memory