mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-07 00:17:37 +08:00
fix: step mobile type empty
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v5.0.0+2411192100
|
v5.0.0+2411192114
|
||||||
|
|||||||
@@ -57,11 +57,6 @@ 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
|
||||||
@@ -419,7 +414,11 @@ func (s *StepMobile) Name() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *StepMobile) Type() StepType {
|
func (s *StepMobile) Type() StepType {
|
||||||
return StepType(s.obj().OSType)
|
osType := s.obj().OSType
|
||||||
|
if osType != "" {
|
||||||
|
return StepType(osType)
|
||||||
|
}
|
||||||
|
return StepType("mobile")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StepMobile) Config() *StepConfig {
|
func (s *StepMobile) Config() *StepConfig {
|
||||||
|
|||||||
@@ -767,7 +767,6 @@ func (s *StepRequest) Android(options ...uixt.AndroidDeviceOption) *StepMobile {
|
|||||||
return &StepMobile{
|
return &StepMobile{
|
||||||
StepConfig: s.StepConfig,
|
StepConfig: s.StepConfig,
|
||||||
Android: &MobileUI{
|
Android: &MobileUI{
|
||||||
OSType: string(stepTypeAndroid),
|
|
||||||
Serial: androidOptions.SerialNumber,
|
Serial: androidOptions.SerialNumber,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -782,7 +781,6 @@ func (s *StepRequest) IOS(options ...uixt.IOSDeviceOption) *StepMobile {
|
|||||||
return &StepMobile{
|
return &StepMobile{
|
||||||
StepConfig: s.StepConfig,
|
StepConfig: s.StepConfig,
|
||||||
IOS: &MobileUI{
|
IOS: &MobileUI{
|
||||||
OSType: string(stepTypeIOS),
|
|
||||||
Serial: iosOptions.UDID,
|
Serial: iosOptions.UDID,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -797,7 +795,6 @@ func (s *StepRequest) Harmony(options ...uixt.HarmonyDeviceOption) *StepMobile {
|
|||||||
return &StepMobile{
|
return &StepMobile{
|
||||||
StepConfig: s.StepConfig,
|
StepConfig: s.StepConfig,
|
||||||
Harmony: &MobileUI{
|
Harmony: &MobileUI{
|
||||||
OSType: string(stepTypeHarmony),
|
|
||||||
Serial: harmonyOptions.ConnectKey,
|
Serial: harmonyOptions.ConnectKey,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user