mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-21 04:22:30 +08:00
fix: failed to find text in scope
This commit is contained in:
@@ -179,16 +179,16 @@ 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 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// match exactly, and not specify index, return the first one
|
// match exactly, and not specify index, return the first one
|
||||||
if data.Index == 0 {
|
if data.Index == 0 {
|
||||||
return rect, nil
|
return rect, nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user