Merge branch 'dev-v4.3' of https://github.com/httprunner/httprunner into dev-v4.3

This commit is contained in:
debugtalk
2022-10-13 20:47:11 +08:00
7 changed files with 313 additions and 6 deletions

View File

@@ -63,6 +63,9 @@ func GetAndroidDeviceOptions(dev *AndroidDevice) (deviceOptions []AndroidDeviceO
if dev.Port != 0 {
deviceOptions = append(deviceOptions, WithAdbPort(dev.Port))
}
if dev.LogOn {
deviceOptions = append(deviceOptions, WithAdbLogOn(true))
}
return
}

View File

@@ -429,14 +429,17 @@ func (dExt *DriverExt) DoAction(action MobileAction) error {
ACTION_SwipeToTapText, action.Params)
case ACTION_SwipeToTapTexts:
if texts, ok := action.Params.([]interface{}); ok {
var textList []string
for _, t := range texts {
textList = append(textList, t.(string))
}
action.Params = textList
}
if texts, ok := action.Params.([]string); ok {
var point PointF
findText := func(d *DriverExt) error {
var err error
var ts []string
for _, t := range texts {
ts = append(ts, t.(string))
}
points, err := d.GetTextXYs(ts)
points, err := d.GetTextXYs(texts)
if err != nil {
return err
}