update: fucntion call

This commit is contained in:
徐聪
2025-05-07 21:39:22 +08:00
parent 0bd621ad3c
commit 2b06e4a280
12 changed files with 94 additions and 98 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ func (dExt *XTDriver) TapByCV(opts ...option.ActionOption) error {
return dExt.TapAbsXY(point.X, point.Y, opts...)
}
func (dExt *XTDriver) RightClickByOCR(ocrText string, opts ...option.ActionOption) error {
func (dExt *XTDriver) SecondaryClickByOCR(ocrText string, opts ...option.ActionOption) error {
actionOptions := option.NewActionOptions(opts...)
point, err := dExt.FindScreenText(ocrText, opts...)
if err != nil {
@@ -66,5 +66,5 @@ func (dExt *XTDriver) RightClickByOCR(ocrText string, opts ...option.ActionOptio
}
return err
}
return dExt.IDriver.(*BrowserDriver).RightClick(point.Center().X, point.Center().Y)
return dExt.SecondaryClick(point.Center().X, point.Center().Y)
}