mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
feat: add uixt tool launch_app
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"github.com/httprunner/httprunner/v5/uixt"
|
||||
"github.com/httprunner/httprunner/v5/uixt/types"
|
||||
)
|
||||
|
||||
func (r *Router) foregroundAppHandler(c *gin.Context) {
|
||||
@@ -50,7 +51,7 @@ func (r *Router) appInfoHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
func (r *Router) clearAppHandler(c *gin.Context) {
|
||||
var appClearReq AppClearRequest
|
||||
var appClearReq types.AppClearRequest
|
||||
if err := c.ShouldBindJSON(&appClearReq); err != nil {
|
||||
RenderErrorValidateRequest(c, err)
|
||||
return
|
||||
@@ -69,7 +70,7 @@ func (r *Router) clearAppHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
func (r *Router) launchAppHandler(c *gin.Context) {
|
||||
var appLaunchReq AppLaunchRequest
|
||||
var appLaunchReq types.AppLaunchRequest
|
||||
if err := c.ShouldBindJSON(&appLaunchReq); err != nil {
|
||||
RenderErrorValidateRequest(c, err)
|
||||
return
|
||||
@@ -87,7 +88,7 @@ func (r *Router) launchAppHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
func (r *Router) terminalAppHandler(c *gin.Context) {
|
||||
var appTerminalReq AppTerminalRequest
|
||||
var appTerminalReq types.AppTerminalRequest
|
||||
if err := c.ShouldBindJSON(&appTerminalReq); err != nil {
|
||||
RenderErrorValidateRequest(c, err)
|
||||
return
|
||||
|
||||
@@ -24,18 +24,6 @@ type KeycodeRequest struct {
|
||||
Keycode int `json:"keycode" binding:"required"`
|
||||
}
|
||||
|
||||
type AppClearRequest struct {
|
||||
PackageName string `json:"packageName" binding:"required"`
|
||||
}
|
||||
|
||||
type AppLaunchRequest struct {
|
||||
PackageName string `json:"packageName" binding:"required"`
|
||||
}
|
||||
|
||||
type AppTerminalRequest struct {
|
||||
PackageName string `json:"packageName" binding:"required"`
|
||||
}
|
||||
|
||||
type AppInstallRequest struct {
|
||||
AppUrl string `json:"appUrl" binding:"required"`
|
||||
MappingUrl string `json:"mappingUrl"`
|
||||
|
||||
Reference in New Issue
Block a user