mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
feat: set os type for mobile ui step
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v5.0.0+2411111113
|
v5.0.0+2411111344
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ func (r *SessionRunner) GetUIXTDriver(serial, osType string) (driver *uixt.Drive
|
|||||||
}
|
}
|
||||||
|
|
||||||
type MobileUI struct {
|
type MobileUI struct {
|
||||||
OSType string `json:"-" yaml:"-"` // ios or harmony or android
|
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
|
Serial string `json:"serial,omitempty" yaml:"serial,omitempty"` // android serial or ios udid
|
||||||
uixt.MobileAction `yaml:",inline"`
|
uixt.MobileAction `yaml:",inline"`
|
||||||
Actions []uixt.MobileAction `json:"actions,omitempty" yaml:"actions,omitempty"`
|
Actions []uixt.MobileAction `json:"actions,omitempty" yaml:"actions,omitempty"`
|
||||||
}
|
}
|
||||||
@@ -126,6 +126,11 @@ func (s *StepMobile) obj() *MobileUI {
|
|||||||
panic("no mobile device config")
|
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 {
|
func (s *StepMobile) Serial(serial string) *StepMobile {
|
||||||
s.obj().Serial = serial
|
s.obj().Serial = serial
|
||||||
return s
|
return s
|
||||||
|
|||||||
Reference in New Issue
Block a user