feat: add GetScreenTexts

This commit is contained in:
lilong.129
2023-05-31 20:17:43 +08:00
parent 42256bc20b
commit e1169ec628
4 changed files with 19 additions and 12 deletions
+2 -3
View File
@@ -135,12 +135,11 @@ func (dExt *DriverExt) swipeToTapTexts(texts []string, options ...ActionOption)
var point PointF
findTexts := func(d *DriverExt) error {
var err error
imageResult, err := d.GetScreenResult()
ocrTexts, err := d.GetScreenTexts()
if err != nil {
return err
}
points, err := imageResult.OCRResult.ToOCRTexts().
FindTexts(texts, dExt.ParseActionOptions(options...)...)
points, err := ocrTexts.FindTexts(texts, dExt.ParseActionOptions(options...)...)
if err != nil {
return err
}