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:
- Python: How to Obtaining Publick IP Quickly
- [Solved] weditor Plug-in Dump Hierarchy Error: Local server not started, start with $ python -m weditor
- [Solved] Pyinstaller Package and Run Error: RuntimeError: Unable to open/read ui device
- Python pyqt5 ui Generate .py File Error [How to Solve]
- Python Error: [9880] failed to execute script [How to Solve]
- [Solved] Pyinstaller packaged exe error: “failed to execute script XXX”
- Jupyter notebook Failed to Switch to the Virual Environment: DLL load failed python.exe could not find the entry
- [Solved] Failed to obtain/convert traceback after Python Tkinter packages exe
- How to Solve Opencv Reads Video Error: cv2.error
- [CUDA Environment] Python Pytorch Error: CudaSetupArgument
- [Solved] Python Selenium Error: AttributeError: ‘WebDriver‘ object has no attribute ‘find_element_by_xpath‘
- Python openpyxl excel open zipfile error resolution: zipfile.BadZipFile: File is not a zip file
- VScode Run CONDA environment Error [How to Solve]
- How to Solve Python Pandas Read or Import Files Error
- [Solved] YOLOv4 Error: Layer before convolutional layer must output image.: No error
- Python synthesizes multiple pictures into one video
- Python+OpenCV: How to Use Background Subtraction Methods
- [Solved] AttributeError: ‘DataFrame‘ object has no attribute ‘tolist‘
- [Solved] D455 Depth Camera Error: keyerror: ‘frame_ device_ t‘