feat: tap by ocr and cv

This commit is contained in:
debugtalk
2022-08-28 23:07:31 +08:00
parent 9db3d3201e
commit bbcb61e0ee
5 changed files with 52 additions and 4 deletions

View File

@@ -297,9 +297,9 @@ func (dExt *DriverExt) FindUIRectInUIKit(search string) (x, y, width, height flo
return dExt.FindImageRectInUIKit(search)
}
func (dExt *DriverExt) FindImageRectInUIKit(search string) (x, y, width, height float64, err error) {
func (dExt *DriverExt) FindImageRectInUIKit(imagePath string) (x, y, width, height float64, err error) {
var bufSource, bufSearch *bytes.Buffer
if bufSearch, err = getBufFromDisk(search); err != nil {
if bufSearch, err = getBufFromDisk(imagePath); err != nil {
return 0, 0, 0, 0, err
}
if bufSource, err = dExt.takeScreenShot(); err != nil {