mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 15:37:35 +08:00
fix: failed to find text in scope
This commit is contained in:
@@ -179,7 +179,6 @@ func (s *veDEMOCRService) FindText(text string, imageBuf []byte, options ...Data
|
|||||||
}
|
}
|
||||||
|
|
||||||
rects = append(rects, rect)
|
rects = append(rects, rect)
|
||||||
}
|
|
||||||
|
|
||||||
// contains text while not match exactly
|
// contains text while not match exactly
|
||||||
if ocrResult.Text != text {
|
if ocrResult.Text != text {
|
||||||
@@ -191,6 +190,7 @@ func (s *veDEMOCRService) FindText(text string, imageBuf []byte, options ...Data
|
|||||||
return rect, nil
|
return rect, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if len(rects) == 0 {
|
if len(rects) == 0 {
|
||||||
return image.Rectangle{}, errors.Wrap(code.OCRTextNotFoundError,
|
return image.Rectangle{}, errors.Wrap(code.OCRTextNotFoundError,
|
||||||
|
|||||||
Reference in New Issue
Block a user