refactor: IDriver

This commit is contained in:
lilong.129
2025-02-11 17:08:25 +08:00
parent 804a2cd90f
commit 0839ef5bd6
22 changed files with 105 additions and 347 deletions

View File

@@ -109,7 +109,7 @@ func (sad *ShootsAndroidDriver) close() error {
}
func (sad *ShootsAndroidDriver) Status() (types.DeviceStatus, error) {
app, err := sad.GetForegroundApp()
app, err := sad.ForegroundInfo()
if err != nil {
return types.DeviceStatus{}, err
}
@@ -122,7 +122,7 @@ func (sad *ShootsAndroidDriver) Status() (types.DeviceStatus, error) {
}
func (sad *ShootsAndroidDriver) Source(srcOpt ...option.SourceOption) (source string, err error) {
app, err := sad.GetForegroundApp()
app, err := sad.ForegroundInfo()
if err != nil {
return "", err
}

View File

@@ -54,7 +54,7 @@ func TestIOSSource(t *testing.T) {
func TestIOSForeground(t *testing.T) {
setupShootsIOSDriver(t)
app, err := shootsIOSDriver.GetForegroundApp()
app, err := shootsIOSDriver.ForegroundInfo()
checkErr(t, err)
t.Log(app)
}