mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-28 11:36:56 +08:00
fix: get ocr exact text in first priority
This commit is contained in:
+12
-5
@@ -460,11 +460,18 @@ func (r *HRPRunner) InitWDAClient(device WDADevice) (client *uiDriver, err error
|
||||
}
|
||||
}
|
||||
|
||||
driverExt, err := uixt.InitWDAClient(
|
||||
gwda.WithSerialNumber(device.UDID),
|
||||
gwda.WithPort(device.Port),
|
||||
gwda.WithMjpegPort(device.MjpegPort),
|
||||
)
|
||||
var deviceOptions []gwda.DeviceOption
|
||||
if device.UDID != "" {
|
||||
deviceOptions = append(deviceOptions, gwda.WithSerialNumber(device.UDID))
|
||||
}
|
||||
if device.Port != 0 {
|
||||
deviceOptions = append(deviceOptions, gwda.WithPort(device.Port))
|
||||
}
|
||||
if device.MjpegPort != 0 {
|
||||
deviceOptions = append(deviceOptions, gwda.WithMjpegPort(device.MjpegPort))
|
||||
}
|
||||
|
||||
driverExt, err := uixt.InitWDAClient(deviceOptions...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user