feat: validate image exists

This commit is contained in:
debugtalk
2022-08-28 23:17:12 +08:00
parent 0ff59bebb5
commit f2b25df87e
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
}