mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-27 11:10:31 +08:00
add popup close_status=found
This commit is contained in:
@@ -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 {
|
||||
@@ -126,9 +132,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
|
||||
|
||||
Reference in New Issue
Block a user