fix: brighten should be executed before unlock

This commit is contained in:
lilong.129
2024-12-04 22:04:21 +08:00
parent a59ac47eca
commit 85cd6ea379
2 changed files with 4 additions and 3 deletions

View File

@@ -1 +1 @@
v5.0.0+2412041737
v5.0.0+2412042204

View File

@@ -193,10 +193,11 @@ 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")
// Notice: brighten should be executed before unlock
// brighten android device screen
dev.d.RunShellCommand("input", "keyevent", "224")
// unlock android device screen
dev.d.RunShellCommand("input", "keyevent", "82")
if dev.UIA2 {
// uiautomator2 server must be started before