change: remove options for AppLaunch/AppTerminate

This commit is contained in:
lilong.129
2025-05-12 17:31:08 +08:00
parent 00a6ca1f61
commit 0722e92e87
4 changed files with 7 additions and 11 deletions

View File

@@ -1 +1 @@
v5.0.0-beta-2505121727
v5.0.0-beta-2505121736

View File

@@ -91,20 +91,18 @@ func (s *StepMobile) WebLoginNoneUI(packageName, phoneNumber string, captcha, pa
return s
}
func (s *StepMobile) AppLaunch(bundleId string, opts ...option.ActionOption) *StepMobile {
func (s *StepMobile) AppLaunch(bundleId string) *StepMobile {
s.obj().Actions = append(s.obj().Actions, uixt.MobileAction{
Method: uixt.ACTION_AppLaunch,
Params: bundleId,
Options: option.NewActionOptions(opts...),
Method: uixt.ACTION_AppLaunch,
Params: bundleId,
})
return s
}
func (s *StepMobile) AppTerminate(bundleId string, opts ...option.ActionOption) *StepMobile {
func (s *StepMobile) AppTerminate(bundleId string) *StepMobile {
s.obj().Actions = append(s.obj().Actions, uixt.MobileAction{
Method: uixt.ACTION_AppTerminate,
Params: bundleId,
Options: option.NewActionOptions(opts...),
Method: uixt.ACTION_AppTerminate,
Params: bundleId,
})
return s
}

View File

@@ -270,7 +270,6 @@ func (ad *ADBDriver) AppLaunch(packageName string) (err error) {
log.Info().Str("packageName", packageName).Msg("ADBDriver.AppLaunch")
// 不指定 Activity 名称启动(启动主 Activity
// adb shell monkey -p <packagename> -c android.intent.category.LAUNCHER 1
sOutput, err := ad.runShellCommand(
"monkey", "-p", packageName, "-c", "android.intent.category.LAUNCHER", "1",
)

View File

@@ -494,7 +494,6 @@ func (wd *WDADriver) AlertSendKeys(text string) (err error) {
func (wd *WDADriver) AppLaunch(bundleId string) (err error) {
log.Info().Str("bundleId", bundleId).Msg("WDADriver.AppLaunch")
// [[FBRoute POST:@"/wda/apps/launch"] respondWithTarget:self action:@selector(handleSessionAppLaunch:)]
data := make(map[string]interface{})
data["bundleId"] = bundleId
data["environment"] = map[string]interface{}{