// Screenshot gets a screenshot of the window
Screenshot gets a screenshot of the window
// Screenshot gets a screenshot of the window
func (d *Driver) Screenshot() (image.Image, error) {
	data, err := d.ScreenshotBase64()
	if err != nil {
		return nil, err
	}
	unbased, err := base64.StdEncoding.DecodeString(data)
	if err != nil {
		panic("Cannot decode b64")
	}
	r := bytes.NewReader(unbased)
	im, err := png.Decode(r)
	return im, err
}
func ( d * Driver ) Screenshot ( ) ( image . Image , error ) { data , err := d . ScreenshotBase64 ( ) if err != nil { return nil , err } unbased , err := base64 . StdEncoding . DecodeString ( data ) if err != nil { panic ( " " ) } r := bytes . NewReader ( unbased ) im , err := png . Decode ( r ) return im , err }
Screenshot gets a screenshot of the window
Screenshot gets a screenshot of the window