mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-09 01:39:39 +08:00
fix: get wda status
This commit is contained in:
@@ -141,6 +141,7 @@ type DeviceDetail struct {
|
|||||||
WiFiAddress string `json:"wifiAddress,omitempty"`
|
WiFiAddress string `json:"wifiAddress,omitempty"`
|
||||||
BuildVersion string `json:"buildVersion,omitempty"`
|
BuildVersion string `json:"buildVersion,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ApplicationType string
|
type ApplicationType string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -220,11 +221,12 @@ func (dev *IOSDevice) NewDriver() (driver IDriver, err error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "failed to init WDA driver")
|
return nil, errors.Wrap(err, "failed to init WDA driver")
|
||||||
}
|
}
|
||||||
wdaStatus, err := driver.Status()
|
wdaStatus, err := wdaDriver.Status()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
log.Info().Interface("status", wdaStatus).Msg("check WDA status")
|
log.Info().Interface("status", wdaStatus).Msg("check WDA status")
|
||||||
|
|
||||||
if dev.Options.ResetHomeOnStartup {
|
if dev.Options.ResetHomeOnStartup {
|
||||||
log.Info().Msg("go back to home screen")
|
log.Info().Msg("go back to home screen")
|
||||||
if err = wdaDriver.Home(); err != nil {
|
if err = wdaDriver.Home(); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user