func (p *Page) Close() {
	_ = p.router.Stop()
	p.page.Close()
}
Close closes a browser page
package engine
import (
	"net/url"
	"time"
	"github.com/go-rod/rod"
	"github.com/go-rod/rod/lib/proto"
)
type Page struct {
	page     *rod.Page
	rules    []requestRule
	instance *Instance
	router   *rod.HijackRouter
}
func (i *Instance) Run(baseURL *url.URL, actions []*Action, timeout time.Duration) (map[string]string, *Page, error) {
	page, err := i.engine.Page(proto.TargetCreateTarget{})
	if err != nil {
		return nil, nil, err
	}
	page = page.Timeout(timeout)
	if i.browser.customAgent != "" {
		if userAgentErr := page.SetUserAgent(&proto.NetworkSetUserAgentOverride{UserAgent: i.browser.customAgent}); userAgentErr != nil {
			return nil, nil, userAgentErr
		}
	}
	createdPage := &Page{page: page, instance: i}
	router := page.HijackRequests()
	if routerErr := router.Add("*", "", createdPage.routingRuleHandler); routerErr != nil {
		return nil, nil, routerErr
	}
	createdPage.router = router
	if err := page.SetViewport(&proto.EmulationSetDeviceMetricsOverride{Viewport: &proto.PageViewport{
		Scale:  1,
		Width:  float64(1920),
		Height: float64(1080),
	}}); err != nil {
		return nil, nil, err
	}
	if _, err := page.SetExtraHeaders([]string{"Accept-Language", "en, en-GB, en-us;"}); err != nil {
		return nil, nil, err
	}
	go router.Run()
	data, err := createdPage.ExecuteActions(baseURL, actions)
	if err != nil {
		return nil, nil, err
	}
	return data, createdPage, nil
}