feat: validate image exists

This commit is contained in:
debugtalk
2022-08-28 23:17:12 +08:00
parent bbcb61e0ee
commit f2627fab9b
5 changed files with 44 additions and 6 deletions

View File

@@ -352,3 +352,8 @@ func (dExt *DriverExt) IsOCRExist(text string) bool {
_, _, _, _, err := dExt.FindTextByOCR(text)
return err == nil
}
func (dExt *DriverExt) IsImageExist(text string) bool {
_, _, _, _, err := dExt.FindImageRectInUIKit(text)
return err == nil
}