change popup close status from bool to string

This commit is contained in:
buyuxiang
2023-08-28 17:58:55 +08:00
parent afe304f58c
commit b0ccd504de
4 changed files with 27 additions and 26 deletions

View File

@@ -74,8 +74,8 @@ func (dExt *DriverExt) AutoPopupHandler() error {
return dExt.handleTextPopup(screenResult.Texts)
}
// CRResult represents the result of recognized popup to close
type CPResult struct {
// ClosePopupsResult represents the result of recognized popup to close
type ClosePopupsResult struct {
Type string `json:"type"`
PopupArea Box `json:"popupArea"`
CloseArea Box `json:"closeArea"`
@@ -83,14 +83,14 @@ type CPResult struct {
}
type PopupInfo struct {
IsClosed bool `json:"is_closed"`
Type string `json:"type"`
Text string `json:"text"`
RetryCount int `json:"retry_count"`
PicName string `json:"pic_name"`
PicURL string `json:"pic_url"`
PopupArea Box `json:"popup_area"`
CloseArea Box `json:"close_area"`
CloseStatus string `json:"close_status"`
Type string `json:"type"`
Text string `json:"text"`
RetryCount int `json:"retry_count"`
PicName string `json:"pic_name"`
PicURL string `json:"pic_url"`
PopupArea Box `json:"popup_area"`
CloseArea Box `json:"close_area"`
}
func (dExt *DriverExt) ClosePopups(options ...ActionOption) error {