refactor: init driver for device

This commit is contained in:
debugtalk
2022-10-11 18:01:49 +08:00
parent dfd463b8d4
commit 36b10cfc23
12 changed files with 178 additions and 158 deletions
+1 -5
View File
@@ -503,11 +503,7 @@ func (r *HRPRunner) initUIClient(device uixt.Device) (client *uixt.DriverExt, er
}
}
if iosDevice, ok := device.(*uixt.IOSDevice); ok {
client, err = uixt.InitWDAClient(iosDevice)
} else if androidDevice, ok := device.(*uixt.AndroidDevice); ok {
client, err = uixt.InitUIAClient(androidDevice)
}
client, err = device.NewDriver()
if err != nil {
return nil, err
}