feat: unlock android device screen; brighten android device screen

This commit is contained in:
lilong.129
2024-11-13 14:51:20 +08:00
parent 589b18f9f0
commit f469ddc1d1
2 changed files with 5 additions and 1 deletions

View File

@@ -194,6 +194,10 @@ func (dev *AndroidDevice) Options() (deviceOptions []AndroidDeviceOption) {
func (dev *AndroidDevice) Init() error {
dev.d.RunShellCommand("ime", "enable", "io.appium.settings/.UnicodeIME")
dev.d.RunShellCommand("rm", "-r", config.DeviceActionLogFilePath)
// unlock android device screen
dev.d.RunShellCommand("input", "keyevent", "82")
// brighten android device screen
dev.d.RunShellCommand("input", "keyevent", "224")
if dev.UIA2 {
// uiautomator2 server must be started before