func (d *domainClient) CaptureSnapshot(ctx context.Context, args *CaptureSnapshotArgs) (reply *CaptureSnapshotReply, err error) {
	reply = new(CaptureSnapshotReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "Page.captureSnapshot", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "Page.captureSnapshot", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "Page", Op: "CaptureSnapshot", Err: err}
	}
	return
}
CaptureSnapshot invokes the Page method. Returns a snapshot of the page as
a string. For MHTML format, the serialization includes iframes, shadow DOM,
external resources, and element-inline styles.
package page
import (
	"context"
	"github.com/mafredri/cdp/protocol/internal"
	"github.com/mafredri/cdp/rpcc"
)
type domainClient struct{ conn *rpcc.Conn }
func NewClient(conn *rpcc.Conn) *domainClient {
	return &domainClient{conn: conn}
}
func (d *domainClient) AddScriptToEvaluateOnLoad(ctx context.Context, args *AddScriptToEvaluateOnLoadArgs) (reply *AddScriptToEvaluateOnLoadReply, err error) {
	reply = new(AddScriptToEvaluateOnLoadReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "Page.addScriptToEvaluateOnLoad", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "Page.addScriptToEvaluateOnLoad", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "Page", Op: "AddScriptToEvaluateOnLoad", Err: err}
	}
	return
}
func (d *domainClient) AddScriptToEvaluateOnNewDocument(ctx context.Context, args *AddScriptToEvaluateOnNewDocumentArgs) (reply *AddScriptToEvaluateOnNewDocumentReply, err error) {
	reply = new(AddScriptToEvaluateOnNewDocumentReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "Page.addScriptToEvaluateOnNewDocument", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "Page.addScriptToEvaluateOnNewDocument", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "Page", Op: "AddScriptToEvaluateOnNewDocument", Err: err}
	}
	return
}
func (d *domainClient) BringToFront(ctx context.Context) (err error) {
	err = rpcc.Invoke(ctx, "Page.bringToFront", nil, nil, d.conn)
	if err != nil {
		err = &internal.OpError{Domain: "Page", Op: "BringToFront", Err: err}
	}
	return
}
func (d *domainClient) CaptureScreenshot(ctx context.Context, args *CaptureScreenshotArgs) (reply *CaptureScreenshotReply, err error) {
	reply = new(CaptureScreenshotReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "Page.captureScreenshot", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "Page.captureScreenshot", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "Page", Op: "CaptureScreenshot", Err: err}
	}
	return
}