mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-05 07:49:37 +08:00
fix: swipe up to unlock device
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v5.0.0+2412181803
|
v5.0.0+2412182148
|
||||||
|
|||||||
@@ -195,9 +195,11 @@ func (dev *AndroidDevice) Init() error {
|
|||||||
dev.d.RunShellCommand("rm", "-r", config.DeviceActionLogFilePath)
|
dev.d.RunShellCommand("rm", "-r", config.DeviceActionLogFilePath)
|
||||||
// Notice: brighten should be executed before unlock
|
// Notice: brighten should be executed before unlock
|
||||||
// brighten android device screen
|
// brighten android device screen
|
||||||
dev.d.RunShellCommand("input", "keyevent", "224")
|
dev.d.RunShellCommand("input", "keyevent", fmt.Sprintf("%d", KCWakeup))
|
||||||
// unlock android device screen
|
// 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 {
|
if dev.UIA2 {
|
||||||
// uiautomator2 server must be started before
|
// uiautomator2 server must be started before
|
||||||
|
|||||||
Reference in New Issue
Block a user