refactor: move cached screenResults from XTDriver to DriverSession

This commit is contained in:
lilong.129
2025-05-06 00:10:54 +08:00
parent ce93df1f23
commit 379fea9008
5 changed files with 22 additions and 15 deletions

View File

@@ -117,11 +117,10 @@ func (dExt *XTDriver) GetData(withReset bool) map[string]interface{} {
session := dExt.GetSession()
data := map[string]interface{}{
"requests": session.History(),
"screen_results": dExt.screenResults,
"screen_results": session.screenResults,
}
if withReset {
session.Reset()
dExt.screenResults = make([]*ScreenResult, 0)
}
return data
}