mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-21 07:33:43 +08:00
fix: swipe up to unlock device
This commit is contained in:
@@ -195,9 +195,11 @@ func (dev *AndroidDevice) Init() error {
|
||||
dev.d.RunShellCommand("rm", "-r", config.DeviceActionLogFilePath)
|
||||
// Notice: brighten should be executed before unlock
|
||||
// brighten android device screen
|
||||
dev.d.RunShellCommand("input", "keyevent", "224")
|
||||
dev.d.RunShellCommand("input", "keyevent", fmt.Sprintf("%d", KCWakeup))
|
||||
// unlock android device screen
|
||||
dev.d.RunShellCommand("input", "keyevent", "82")
|
||||
dev.d.RunShellCommand("input", "keyevent", fmt.Sprintf("%d", KCMenu))
|
||||
// swipe up to unlock
|
||||
dev.d.RunShellCommand("input", "swipe", "540", "1000", "540", "500")
|
||||
|
||||
if dev.UIA2 {
|
||||
// uiautomator2 server must be started before
|
||||
|
||||
Reference in New Issue
Block a user