mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 15:37:35 +08:00
fix: web ui test
This commit is contained in:
@@ -2,6 +2,7 @@ package option
|
||||
|
||||
type IOSDeviceOptions struct {
|
||||
UDID string `json:"udid,omitempty" yaml:"udid,omitempty"`
|
||||
Wireless bool `json:"wireless,omitempty" yaml:"wireless,omitempty"`
|
||||
WDAPort int `json:"port,omitempty" yaml:"port,omitempty"` // WDA remote port
|
||||
WDAMjpegPort int `json:"mjpeg_port,omitempty" yaml:"mjpeg_port,omitempty"` // WDA remote MJPEG port
|
||||
LogOn bool `json:"log_on,omitempty" yaml:"log_on,omitempty"`
|
||||
@@ -20,6 +21,9 @@ func (dev *IOSDeviceOptions) Options() (deviceOptions []IOSDeviceOption) {
|
||||
if dev.UDID != "" {
|
||||
deviceOptions = append(deviceOptions, WithUDID(dev.UDID))
|
||||
}
|
||||
if dev.Wireless {
|
||||
deviceOptions = append(deviceOptions, WithWireless(true))
|
||||
}
|
||||
if dev.WDAPort != 0 {
|
||||
deviceOptions = append(deviceOptions, WithWDAPort(dev.WDAPort))
|
||||
}
|
||||
@@ -101,6 +105,12 @@ func WithUDID(udid string) IOSDeviceOption {
|
||||
}
|
||||
}
|
||||
|
||||
func WithWireless(on bool) IOSDeviceOption {
|
||||
return func(device *IOSDeviceOptions) {
|
||||
device.Wireless = on
|
||||
}
|
||||
}
|
||||
|
||||
func WithWDAPort(port int) IOSDeviceOption {
|
||||
return func(device *IOSDeviceOptions) {
|
||||
device.WDAPort = port
|
||||
|
||||
Reference in New Issue
Block a user