merge master

This commit is contained in:
lilong.129
2023-09-05 21:37:08 +08:00
8 changed files with 99 additions and 38 deletions

View File

@@ -27,6 +27,12 @@ var popups = [][]string{
{"管理使用时间", ".*忽略.*"},
}
const (
CloseStatusFound = "found"
CloseStatusSuccess = "success"
CloseStatusFail = "fail"
)
func findTextPopup(screenTexts OCRTexts) (closePoint *OCRText) {
for _, popup := range popups {
if len(popup) != 2 {
@@ -127,9 +133,13 @@ func (dExt *DriverExt) ClosePopupsHandler(options ...ActionOption) error {
break
}
screenResult.Popup.RetryCount = retryCount
if !screenResult.Popup.PopupArea.IsEmpty() {
screenResult.Popup.CloseStatus = CloseStatusFound
}
if screenResult.Popup.CloseArea.IsEmpty() {
break
}
screenResult.Popup.CloseStatus = CloseStatusFound
if err = dExt.tapPopupHandler(screenResult.Popup); err != nil {
return err