mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-06 16:07:45 +08:00
feat: SwipeUntil
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"io/ioutil"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -92,10 +93,12 @@ func (s *veDEMOCRService) FindText(text string, imageBuf []byte) (rect image.Rec
|
||||
}
|
||||
|
||||
for _, ocrResult := range ocrResults {
|
||||
if ocrResult.Text != text {
|
||||
// not contains text
|
||||
if !strings.Contains(ocrResult.Text, text) {
|
||||
continue
|
||||
}
|
||||
|
||||
// contains text
|
||||
// only find the first matched one
|
||||
rect = image.Rectangle{
|
||||
// ocrResult.Points 顺序:左上 -> 右上 -> 右下 -> 左下
|
||||
|
||||
Reference in New Issue
Block a user