mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-06 16:07:45 +08:00
feat: add GetScreenTexts
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user