fix: panic when close popup

This commit is contained in:
lilong.129
2023-09-21 12:03:19 +08:00
parent dc1d71d85b
commit 0e648e303c

View File

@@ -407,7 +407,7 @@ func (dExt *DriverExt) GetScreenResult(options ...ActionOption) (screenResult *S
screenResult.UploadedURL = imageResult.URL
screenResult.Icons = imageResult.UIResult
if actionOptions.ScreenShotWithClosePopups {
if actionOptions.ScreenShotWithClosePopups && imageResult.CPResult != nil {
screenResult.Popup = &PopupInfo{
Type: imageResult.CPResult.Type,
Text: imageResult.CPResult.Text,