mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-06 00:09:37 +08:00
refactor: XTDriver
This commit is contained in:
@@ -16,7 +16,7 @@ func unlockHandler(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
err = dExt.GetDriver().Unlock()
|
||||
err = dExt.Unlock()
|
||||
if err != nil {
|
||||
log.Err(err).Msg(fmt.Sprintf("[%s]: failed to unlick screen", c.HandlerName()))
|
||||
c.JSON(http.StatusInternalServerError,
|
||||
@@ -37,7 +37,7 @@ func homeHandler(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
err = dExt.GetDriver().Homescreen()
|
||||
err = dExt.Homescreen()
|
||||
if err != nil {
|
||||
log.Err(err).Msg(fmt.Sprintf("[%s]: failed to enter homescreen", c.HandlerName()))
|
||||
c.JSON(http.StatusInternalServerError,
|
||||
@@ -64,7 +64,7 @@ func keycodeHandler(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
err = dExt.GetDriver().PressKeyCode(uixt.KeyCode(keycodeReq.Keycode))
|
||||
err = dExt.PressKeyCode(uixt.KeyCode(keycodeReq.Keycode))
|
||||
if err != nil {
|
||||
log.Err(err).Msg(fmt.Sprintf("[%s]: failed to input keycode %d", c.HandlerName(), keycodeReq.Keycode))
|
||||
c.JSON(http.StatusInternalServerError,
|
||||
|
||||
Reference in New Issue
Block a user