uiautomator
uiautomator copied to clipboard
uiautomator
How to adjust the brightness of the phone to strengthen? How do I press and hold the power button to turn it off?
Hi @pengyanbing84 , As I know there no any implementation to adjust brightness in uiautomatior. Even though there is an implementation for long click [e.g.: d.long_click(x, y)] you cannot long press the power button. Direct power button press is only implemented for single click. So, for both actions you may use ADB commands (you can do this using Python). e.g.: Use ADB command to long press power button. then click shutdown button using uiautomator.