Documentation ¶
Index ¶
- Constants
- type ConnectionOptions
- type Driver
- type HTMLPage
- func LoadHTMLPage(ctx context.Context, conn *rpcc.Conn, params drivers.Params) (p *HTMLPage, err error)
- func LoadHTMLPageWithContent(ctx context.Context, conn *rpcc.Conn, params drivers.Params, content []byte) (p *HTMLPage, err error)
- func NewHTMLPage(logger zerolog.Logger, conn *rpcc.Conn, client *cdp.Client, ...) *HTMLPage
- func (p *HTMLPage) CaptureScreenshot(ctx context.Context, params drivers.ScreenshotParams) (values.Binary, error)
- func (p *HTMLPage) Close() error
- func (p *HTMLPage) Compare(other core.Value) int64
- func (p *HTMLPage) Copy() core.Value
- func (p *HTMLPage) DeleteCookies(ctx context.Context, cookies *drivers.HTTPCookies) error
- func (p *HTMLPage) GetCookies(ctx context.Context) (*drivers.HTTPCookies, error)
- func (p *HTMLPage) GetFrame(ctx context.Context, idx values.Int) (core.Value, error)
- func (p *HTMLPage) GetFrames(ctx context.Context) (*values.Array, error)
- func (p *HTMLPage) GetIn(ctx context.Context, path []core.Value) (core.Value, core.PathError)
- func (p *HTMLPage) GetMainFrame() drivers.HTMLDocument
- func (p *HTMLPage) GetResponse(ctx context.Context) (drivers.HTTPResponse, error)
- func (p *HTMLPage) GetURL() values.String
- func (p *HTMLPage) Hash() uint64
- func (p *HTMLPage) IsClosed() values.Boolean
- func (p *HTMLPage) Iterate(ctx context.Context) (core.Iterator, error)
- func (p *HTMLPage) Length() values.Int
- func (p *HTMLPage) MarshalJSON() ([]byte, error)
- func (p *HTMLPage) Navigate(ctx context.Context, url values.String) error
- func (p *HTMLPage) NavigateBack(ctx context.Context, skip values.Int) (values.Boolean, error)
- func (p *HTMLPage) NavigateForward(ctx context.Context, skip values.Int) (values.Boolean, error)
- func (p *HTMLPage) PrintToPDF(ctx context.Context, params drivers.PDFParams) (values.Binary, error)
- func (p *HTMLPage) SetCookies(ctx context.Context, cookies *drivers.HTTPCookies) error
- func (p *HTMLPage) SetIn(ctx context.Context, path []core.Value, value core.Value) core.PathError
- func (p *HTMLPage) String() string
- func (p *HTMLPage) Subscribe(ctx context.Context, subscription events.Subscription) (events.Stream, error)
- func (p *HTMLPage) Type() core.Type
- func (p *HTMLPage) Unwrap() interface{}
- func (p *HTMLPage) WaitForFrameNavigation(ctx context.Context, frame drivers.HTMLDocument, targetURL values.String) error
- func (p *HTMLPage) WaitForNavigation(ctx context.Context, targetURL values.String) error
- type HTMLPageEvent
- type Option
- func WithAddress(address string) Option
- func WithBufferSize(size int) Option
- func WithCompression() Option
- func WithCookie(cookie drivers.HTTPCookie) Option
- func WithCookies(cookies []drivers.HTTPCookie) Option
- func WithCustomName(name string) Option
- func WithHeader(name string, header []string) Option
- func WithHeaders(headers *drivers.HTTPHeaders) Option
- func WithKeepCookies() Option
- func WithNoCompression() Option
- func WithProxy(address string) Option
- func WithUserAgent(value string) Option
- type Options
Constants ¶
View Source
const ( DefaultAddress = "http://127.0.0.1:9222" DefaultBufferSize = 1048562 )
View Source
const BlankPageURL = "about:blank"
View Source
const DriverName = "cdp"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionOptions ¶ added in v0.16.0
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
type HTMLPage ¶ added in v0.8.0
type HTMLPage struct {
// contains filtered or unexported fields
}
func LoadHTMLPage ¶ added in v0.8.0
func LoadHTMLPageWithContent ¶ added in v0.10.0
func NewHTMLPage ¶ added in v0.8.0
func (*HTMLPage) CaptureScreenshot ¶ added in v0.8.0
func (*HTMLPage) DeleteCookies ¶ added in v0.8.0
func (*HTMLPage) GetCookies ¶ added in v0.8.0
func (*HTMLPage) GetMainFrame ¶ added in v0.8.0
func (p *HTMLPage) GetMainFrame() drivers.HTMLDocument
func (*HTMLPage) GetResponse ¶ added in v0.10.0
func (*HTMLPage) MarshalJSON ¶ added in v0.8.0
func (*HTMLPage) NavigateBack ¶ added in v0.8.0
func (*HTMLPage) NavigateForward ¶ added in v0.8.0
func (*HTMLPage) PrintToPDF ¶ added in v0.8.0
func (*HTMLPage) SetCookies ¶ added in v0.8.0
func (*HTMLPage) WaitForFrameNavigation ¶ added in v0.12.0
type HTMLPageEvent ¶ added in v0.16.0
type HTMLPageEvent string
type Option ¶
type Option func(opts *Options)
func WithAddress ¶
func WithBufferSize ¶ added in v0.16.0
func WithCompression ¶ added in v0.16.0
func WithCompression() Option
func WithCookie ¶ added in v0.9.0
func WithCookie(cookie drivers.HTTPCookie) Option
func WithCookies ¶ added in v0.9.0
func WithCookies(cookies []drivers.HTTPCookie) Option
func WithCustomName ¶ added in v0.7.0
func WithHeader ¶ added in v0.9.0
func WithHeaders ¶ added in v0.9.0
func WithHeaders(headers *drivers.HTTPHeaders) Option
func WithKeepCookies ¶ added in v0.7.0
func WithKeepCookies() Option
func WithNoCompression ¶ added in v0.16.0
func WithNoCompression() Option
func WithUserAgent ¶
Click to show internal directories.
Click to hide internal directories.