mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
refactor: get window size
This commit is contained in:
@@ -44,11 +44,15 @@ func (dExt *DriverExt) GetScreenResult(options ...ActionOption) (screenResult *S
|
||||
return
|
||||
}
|
||||
|
||||
windowSize, err := dExt.Driver.WindowSize()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
screenResult = &ScreenResult{
|
||||
bufSource: bufSource,
|
||||
imagePath: imagePath,
|
||||
Tags: nil,
|
||||
Resolution: dExt.WindowSize,
|
||||
Resolution: windowSize,
|
||||
}
|
||||
// cache screen result
|
||||
dExt.Driver.GetSession().addScreenResult(screenResult)
|
||||
|
||||
Reference in New Issue
Block a user