func (p *Page) Reset() error {
	p.ConfirmPopup()

	url, err := p.URL()
	if err != nil {
		return err
	}
	if url == "about:blank" {
		return nil
	}

	if err := p.ClearCookies(); err != nil {
		return err
	}

	if err := p.session.DeleteLocalStorage(); err != nil {
		if err := p.RunScript("localStorage.clear();", nil, nil); err != nil {
			return err
		}
	}

	if err := p.session.DeleteSessionStorage(); err != nil {
		if err := p.RunScript("sessionStorage.clear();", nil, nil); err != nil {
			return err
		}
	}

	return p.Navigate("about:blank")
}
func (p *Page) Reset() error {
	p.ConfirmPopup()

	url, err := p.URL()
	if err != nil {
		return err
	}
	if url == "about:blank" {
		return nil
	}

	if err := p.ClearCookies(); err != nil {
		return err
	}

	if err := p.session.DeleteLocalStorage(); err != nil {
		if err := p.RunScript("localStorage.clear();", nil, nil); err != nil {
			return err
		}
	}

	if err := p.session.DeleteSessionStorage(); err != nil {
		if err := p.RunScript("sessionStorage.clear();", nil, nil); err != nil {
			return err
		}
	}

	return p.Navigate("about:blank")
}
func ( p * Page ) Reset ( ) error { p . ConfirmPopup ( ) url , err := p . URL ( ) if err != nil { return err } if url == " " { return nil } if err := p . ClearCookies ( ) ; err != nil { return err } if err := p . session . DeleteLocalStorage ( ) ; err != nil { if err := p . RunScript ( " " , nil , nil ) ; err != nil { return err } } if err := p . session . DeleteSessionStorage ( ) ; err != nil { if err := p . RunScript ( " " , nil , nil ) ; err != nil { return err } } return p . Navigate ( " " ) }
// Reset deletes all cookies set for the current domain and navigates to a blank page.
// Unlike Destroy, Reset will permit the page to be re-used after it is called.
// Reset is faster than Destroy, but any cookies from domains outside the current
// domain will remain after a page is reset.
Reset deletes all cookies set for the current domain and navigates to a blank page . Unlike Destroy Reset will permit the page to be re - used after it is called . Reset is faster than Destroy but any cookies from domains outside the current domain will remain after a page is reset .