mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-28 03:30:01 +08:00
feat: log uixt action
This commit is contained in:
@@ -131,6 +131,14 @@ func (s *StepMobile) Serial(serial string) *StepMobile {
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *StepMobile) Log(actionName string) *StepMobile {
|
||||
s.obj().Actions = append(s.obj().Actions, uixt.MobileAction{
|
||||
Method: uixt.ACTION_LOG,
|
||||
Params: actionName,
|
||||
})
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *StepMobile) InstallApp(path string) *StepMobile {
|
||||
s.obj().Actions = append(s.obj().Actions, uixt.MobileAction{
|
||||
Method: uixt.ACTION_AppInstall,
|
||||
@@ -676,6 +684,11 @@ func runStepMobileUI(s *SessionRunner, step IStep) (stepResult *StepResult, err
|
||||
return nil, errors.New("invalid mobile UI step type")
|
||||
}
|
||||
|
||||
// TODO: fix this
|
||||
if mobileStep.OSType == "" {
|
||||
mobileStep.OSType = string(stepTypeAndroid)
|
||||
}
|
||||
|
||||
// report GA event
|
||||
go sdk.SendGA4Event("hrp_run_ui", map[string]interface{}{
|
||||
"osType": mobileStep.OSType,
|
||||
|
||||
Reference in New Issue
Block a user