feat: set os type for mobile ui step

This commit is contained in:
lilong.129
2024-11-11 13:44:35 +08:00
parent 8e7ac41841
commit e29a510535
2 changed files with 8 additions and 3 deletions

View File

@@ -1 +1 @@
v5.0.0+2411111113
v5.0.0+2411111344

View File

@@ -83,8 +83,8 @@ func (r *SessionRunner) GetUIXTDriver(serial, osType string) (driver *uixt.Drive
}
type MobileUI struct {
OSType string `json:"-" yaml:"-"` // ios or harmony or android
Serial string `json:"serial,omitempty" yaml:"serial,omitempty"` // android serial or ios udid
OSType string `json:"os_type,omitempty" yaml:"os_type,omitempty"` // ios or harmony or android
Serial string `json:"serial,omitempty" yaml:"serial,omitempty"` // android serial or ios udid
uixt.MobileAction `yaml:",inline"`
Actions []uixt.MobileAction `json:"actions,omitempty" yaml:"actions,omitempty"`
}
@@ -126,6 +126,11 @@ func (s *StepMobile) obj() *MobileUI {
panic("no mobile device config")
}
func (s *StepMobile) OSType(ostype string) *StepMobile {
s.obj().OSType = ostype
return s
}
func (s *StepMobile) Serial(serial string) *StepMobile {
s.obj().Serial = serial
return s