chore: identifier

* chore: identifier
* chore: identifier

https://code.byted.org/iesqa/httprunner/merge_requests/35
This commit is contained in:
曹帅
2024-04-29 08:06:38 +00:00
parent 9a3023bdd9
commit 93dc17b8de
4 changed files with 17 additions and 1 deletions

View File

@@ -1 +1 @@
v4.3.9
v4.3.10

View File

@@ -417,6 +417,7 @@ func (dExt *DriverExt) GetScreenResult(options ...ActionOption) (screenResult *S
screenResult.Texts = imageResult.OCRResult.ToOCRTexts()
screenResult.UploadedURL = imageResult.URL
screenResult.Icons = imageResult.UIResult
screenResult.Video = &Video{LiveType: imageResult.LiveType}
if actionOptions.ScreenShotWithClosePopups && imageResult.CPResult != nil {
screenResult.Popup = &PopupInfo{

View File

@@ -16,6 +16,7 @@ const (
type StepResult struct {
Name string `json:"name" yaml:"name"` // step name
Identifier string `json:"identifier" yaml:"identifier"` // step identifier
StartTime int64 `json:"start_time" yaml:"time"` // step start time
StepType StepType `json:"step_type" yaml:"step_type"` // step type, testcase/request/transaction/rendezvous
Success bool `json:"success" yaml:"success"` // step execution result

View File

@@ -599,8 +599,22 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err
"osType": osType,
})
identifer := mobileStep.Identifier
if mobileStep.Options != nil && identifer == "" {
identifer = mobileStep.Options.Identifier
}
if len(mobileStep.Actions) != 0 && identifer == "" {
for _, action := range mobileStep.Actions {
if action.Identifier != "" {
identifer = action.Identifier
break
}
}
}
stepResult = &StepResult{
Name: step.Name,
Identifier: identifer,
StepType: StepType(osType),
Success: false,
ContentSize: 0,