change: remove options for AppLaunch/AppTerminate/AppClear

This commit is contained in:
lilong.129
2025-05-12 17:26:57 +08:00
parent 0b1a92d8dd
commit 00a6ca1f61
8 changed files with 19 additions and 62 deletions

View File

@@ -491,14 +491,10 @@ func (wd *WDADriver) AlertSendKeys(text string) (err error) {
return
}
func (wd *WDADriver) AppLaunch(bundleId string, opts ...option.ActionOption) (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:)]
actionOptions := option.NewActionOptions(opts...)
preHandler_AppLaunch(wd, actionOptions)
defer postHandler(wd, actionOptions)
data := make(map[string]interface{})
data["bundleId"] = bundleId
data["environment"] = map[string]interface{}{
@@ -525,14 +521,9 @@ func (wd *WDADriver) AppLaunchUnattached(bundleId string) (err error) {
return nil
}
func (wd *WDADriver) AppTerminate(bundleId string, opts ...option.ActionOption) (successful bool, err error) {
func (wd *WDADriver) AppTerminate(bundleId string) (successful bool, err error) {
log.Info().Str("bundleId", bundleId).Msg("WDADriver.AppTerminate")
// [[FBRoute POST:@"/wda/apps/terminate"] respondWithTarget:self action:@selector(handleSessionAppTerminate:)]
actionOptions := option.NewActionOptions(opts...)
preHandler_AppTerminate(wd, actionOptions)
defer postHandler(wd, actionOptions)
data := map[string]interface{}{"bundleId": bundleId}
var rawResp DriverRawResponse
urlStr := fmt.Sprintf("/session/%s/wda/apps/terminate", wd.Session.ID)
@@ -744,7 +735,7 @@ func (wd *WDADriver) Backspace(count int, opts ...option.ActionOption) (err erro
return
}
func (wd *WDADriver) AppClear(packageName string, opts ...option.ActionOption) error {
func (wd *WDADriver) AppClear(packageName string) error {
return types.ErrDriverNotImplemented
}