Documentation ¶
Index ¶
- Constants
- func IsScreenshotFormatValid(format string) bool
- type Driver
- type HTMLDocument
- func (doc *HTMLDocument) CaptureScreenshot(params *ScreenshotArgs) (core.Value, error)
- func (doc *HTMLDocument) ClickBySelector(selector values.String) (values.Boolean, error)
- func (doc *HTMLDocument) ClickBySelectorAll(selector values.String) (values.Boolean, error)
- func (doc *HTMLDocument) Close() error
- func (doc *HTMLDocument) Compare(other core.Value) int
- func (doc *HTMLDocument) Copy() core.Value
- func (doc *HTMLDocument) CountBySelector(selector values.String) values.Int
- func (doc *HTMLDocument) GetAttribute(name values.String) core.Value
- func (doc *HTMLDocument) GetAttributes() core.Value
- func (doc *HTMLDocument) GetChildNode(idx values.Int) core.Value
- func (doc *HTMLDocument) GetChildNodes() core.Value
- func (doc *HTMLDocument) Hash() uint64
- func (doc *HTMLDocument) HoverBySelector(selector values.String) error
- func (doc *HTMLDocument) InnerHTML() values.String
- func (doc *HTMLDocument) InnerHTMLBySelector(selector values.String) values.String
- func (doc *HTMLDocument) InnerHTMLBySelectorAll(selector values.String) *values.Array
- func (doc *HTMLDocument) InnerText() values.String
- func (doc *HTMLDocument) InnerTextBySelector(selector values.String) values.String
- func (doc *HTMLDocument) InnerTextBySelectorAll(selector values.String) *values.Array
- func (doc *HTMLDocument) InputBySelector(selector values.String, value core.Value, delay values.Int) (values.Boolean, error)
- func (doc *HTMLDocument) Length() values.Int
- func (doc *HTMLDocument) MarshalJSON() ([]byte, error)
- func (doc *HTMLDocument) Navigate(url values.String, timeout values.Int) error
- func (doc *HTMLDocument) NavigateBack(skip values.Int, timeout values.Int) (values.Boolean, error)
- func (doc *HTMLDocument) NavigateForward(skip values.Int, timeout values.Int) (values.Boolean, error)
- func (doc *HTMLDocument) NodeName() values.String
- func (doc *HTMLDocument) NodeType() values.Int
- func (doc *HTMLDocument) PrintToPDF(params *page.PrintToPDFArgs) (core.Value, error)
- func (doc *HTMLDocument) QuerySelector(selector values.String) core.Value
- func (doc *HTMLDocument) QuerySelectorAll(selector values.String) core.Value
- func (doc *HTMLDocument) ScrollBottom() error
- func (doc *HTMLDocument) ScrollBySelector(selector values.String) error
- func (doc *HTMLDocument) ScrollTop() error
- func (doc *HTMLDocument) SelectBySelector(selector values.String, value *values.Array) (*values.Array, error)
- func (doc *HTMLDocument) String() string
- func (doc *HTMLDocument) Type() core.Type
- func (doc *HTMLDocument) URL() core.Value
- func (doc *HTMLDocument) Unwrap() interface{}
- func (doc *HTMLDocument) Value() core.Value
- func (doc *HTMLDocument) WaitForClass(selector, class values.String, timeout values.Int) error
- func (doc *HTMLDocument) WaitForClassAll(selector, class values.String, timeout values.Int) error
- func (doc *HTMLDocument) WaitForNavigation(timeout values.Int) error
- func (doc *HTMLDocument) WaitForSelector(selector values.String, timeout values.Int) error
- type HTMLElement
- func (el *HTMLElement) Click() (values.Boolean, error)
- func (el *HTMLElement) Close() error
- func (el *HTMLElement) Compare(other core.Value) int
- func (el *HTMLElement) Copy() core.Value
- func (el *HTMLElement) CountBySelector(selector values.String) values.Int
- func (el *HTMLElement) GetAttribute(name values.String) core.Value
- func (el *HTMLElement) GetAttributes() core.Value
- func (el *HTMLElement) GetChildNode(idx values.Int) core.Value
- func (el *HTMLElement) GetChildNodes() core.Value
- func (el *HTMLElement) Hash() uint64
- func (el *HTMLElement) Hover() error
- func (el *HTMLElement) InnerHTML() values.String
- func (el *HTMLElement) InnerHTMLBySelector(selector values.String) values.String
- func (el *HTMLElement) InnerHTMLBySelectorAll(selector values.String) *values.Array
- func (el *HTMLElement) InnerText() values.String
- func (el *HTMLElement) InnerTextBySelector(selector values.String) values.String
- func (el *HTMLElement) InnerTextBySelectorAll(selector values.String) *values.Array
- func (el *HTMLElement) Input(value core.Value, delay values.Int) error
- func (el *HTMLElement) IsConnected() values.Boolean
- func (el *HTMLElement) Length() values.Int
- func (el *HTMLElement) MarshalJSON() ([]byte, error)
- func (el *HTMLElement) NodeName() values.String
- func (el *HTMLElement) NodeType() values.Int
- func (el *HTMLElement) QuerySelector(selector values.String) core.Value
- func (el *HTMLElement) QuerySelectorAll(selector values.String) core.Value
- func (el *HTMLElement) ScrollIntoView() error
- func (el *HTMLElement) Select(value *values.Array) (*values.Array, error)
- func (el *HTMLElement) String() string
- func (el *HTMLElement) Type() core.Type
- func (el *HTMLElement) Unwrap() interface{}
- func (el *HTMLElement) Value() core.Value
- func (el *HTMLElement) WaitForClass(class values.String, timeout values.Int) error
- type HTMLElementIdentity
- type Option
- type Options
- type Quad
- type ScreenshotArgs
- type ScreenshotFormat
Constants ¶
View Source
const BlankPageURL = "about:blank"
View Source
const DefaultTimeout = time.Second * 30
Variables ¶
This section is empty.
Functions ¶
func IsScreenshotFormatValid ¶
Types ¶
type HTMLDocument ¶
func LoadHTMLDocument ¶
func NewHTMLDocument ¶
func NewHTMLDocument( logger *zerolog.Logger, conn *rpcc.Conn, client *cdp.Client, broker *events.EventBroker, url values.String, rootElement *HTMLElement, ) *HTMLDocument
func (*HTMLDocument) CaptureScreenshot ¶
func (doc *HTMLDocument) CaptureScreenshot(params *ScreenshotArgs) (core.Value, error)
func (*HTMLDocument) ClickBySelector ¶
func (*HTMLDocument) ClickBySelectorAll ¶
func (*HTMLDocument) Close ¶
func (doc *HTMLDocument) Close() error
func (*HTMLDocument) Copy ¶
func (doc *HTMLDocument) Copy() core.Value
func (*HTMLDocument) CountBySelector ¶
func (doc *HTMLDocument) CountBySelector(selector values.String) values.Int
func (*HTMLDocument) GetAttribute ¶
func (doc *HTMLDocument) GetAttribute(name values.String) core.Value
func (*HTMLDocument) GetAttributes ¶
func (doc *HTMLDocument) GetAttributes() core.Value
func (*HTMLDocument) GetChildNode ¶
func (doc *HTMLDocument) GetChildNode(idx values.Int) core.Value
func (*HTMLDocument) GetChildNodes ¶
func (doc *HTMLDocument) GetChildNodes() core.Value
func (*HTMLDocument) Hash ¶
func (doc *HTMLDocument) Hash() uint64
func (*HTMLDocument) HoverBySelector ¶ added in v0.5.0
func (doc *HTMLDocument) HoverBySelector(selector values.String) error
func (*HTMLDocument) InnerHTML ¶
func (doc *HTMLDocument) InnerHTML() values.String
func (*HTMLDocument) InnerHTMLBySelector ¶
func (doc *HTMLDocument) InnerHTMLBySelector(selector values.String) values.String
func (*HTMLDocument) InnerHTMLBySelectorAll ¶
func (doc *HTMLDocument) InnerHTMLBySelectorAll(selector values.String) *values.Array
func (*HTMLDocument) InnerText ¶
func (doc *HTMLDocument) InnerText() values.String
func (*HTMLDocument) InnerTextBySelector ¶
func (doc *HTMLDocument) InnerTextBySelector(selector values.String) values.String
func (*HTMLDocument) InnerTextBySelectorAll ¶
func (doc *HTMLDocument) InnerTextBySelectorAll(selector values.String) *values.Array
func (*HTMLDocument) InputBySelector ¶
func (*HTMLDocument) Length ¶
func (doc *HTMLDocument) Length() values.Int
func (*HTMLDocument) MarshalJSON ¶
func (doc *HTMLDocument) MarshalJSON() ([]byte, error)
func (*HTMLDocument) NavigateBack ¶
func (*HTMLDocument) NavigateForward ¶
func (*HTMLDocument) NodeName ¶
func (doc *HTMLDocument) NodeName() values.String
func (*HTMLDocument) NodeType ¶
func (doc *HTMLDocument) NodeType() values.Int
func (*HTMLDocument) PrintToPDF ¶
func (doc *HTMLDocument) PrintToPDF(params *page.PrintToPDFArgs) (core.Value, error)
func (*HTMLDocument) QuerySelector ¶
func (doc *HTMLDocument) QuerySelector(selector values.String) core.Value
func (*HTMLDocument) QuerySelectorAll ¶
func (doc *HTMLDocument) QuerySelectorAll(selector values.String) core.Value
func (*HTMLDocument) ScrollBottom ¶ added in v0.5.0
func (doc *HTMLDocument) ScrollBottom() error
func (*HTMLDocument) ScrollBySelector ¶ added in v0.5.0
func (doc *HTMLDocument) ScrollBySelector(selector values.String) error
func (*HTMLDocument) ScrollTop ¶ added in v0.5.0
func (doc *HTMLDocument) ScrollTop() error
func (*HTMLDocument) SelectBySelector ¶ added in v0.5.0
func (*HTMLDocument) String ¶
func (doc *HTMLDocument) String() string
func (*HTMLDocument) Type ¶
func (doc *HTMLDocument) Type() core.Type
func (*HTMLDocument) URL ¶
func (doc *HTMLDocument) URL() core.Value
func (*HTMLDocument) Unwrap ¶
func (doc *HTMLDocument) Unwrap() interface{}
func (*HTMLDocument) Value ¶
func (doc *HTMLDocument) Value() core.Value
func (*HTMLDocument) WaitForClass ¶
func (*HTMLDocument) WaitForClassAll ¶
func (*HTMLDocument) WaitForNavigation ¶
func (doc *HTMLDocument) WaitForNavigation(timeout values.Int) error
func (*HTMLDocument) WaitForSelector ¶
type HTMLElement ¶
type HTMLElement struct {
// contains filtered or unexported fields
}
func LoadElement ¶
func LoadElement( ctx context.Context, logger *zerolog.Logger, client *cdp.Client, broker *events.EventBroker, nodeID dom.NodeID, backendID dom.BackendNodeID, ) (*HTMLElement, error)
func NewHTMLElement ¶
func NewHTMLElement( logger *zerolog.Logger, client *cdp.Client, broker *events.EventBroker, id *HTMLElementIdentity, nodeType int, nodeName string, attributes []string, value string, innerHTML values.String, children []*HTMLElementIdentity, ) *HTMLElement
func (*HTMLElement) Close ¶
func (el *HTMLElement) Close() error
func (*HTMLElement) Copy ¶
func (el *HTMLElement) Copy() core.Value
func (*HTMLElement) CountBySelector ¶
func (el *HTMLElement) CountBySelector(selector values.String) values.Int
func (*HTMLElement) GetAttribute ¶
func (el *HTMLElement) GetAttribute(name values.String) core.Value
func (*HTMLElement) GetAttributes ¶
func (el *HTMLElement) GetAttributes() core.Value
func (*HTMLElement) GetChildNode ¶
func (el *HTMLElement) GetChildNode(idx values.Int) core.Value
func (*HTMLElement) GetChildNodes ¶
func (el *HTMLElement) GetChildNodes() core.Value
func (*HTMLElement) Hash ¶
func (el *HTMLElement) Hash() uint64
func (*HTMLElement) Hover ¶ added in v0.5.0
func (el *HTMLElement) Hover() error
func (*HTMLElement) InnerHTML ¶
func (el *HTMLElement) InnerHTML() values.String
func (*HTMLElement) InnerHTMLBySelector ¶
func (el *HTMLElement) InnerHTMLBySelector(selector values.String) values.String
func (*HTMLElement) InnerHTMLBySelectorAll ¶
func (el *HTMLElement) InnerHTMLBySelectorAll(selector values.String) *values.Array
func (*HTMLElement) InnerText ¶
func (el *HTMLElement) InnerText() values.String
func (*HTMLElement) InnerTextBySelector ¶
func (el *HTMLElement) InnerTextBySelector(selector values.String) values.String
func (*HTMLElement) InnerTextBySelectorAll ¶
func (el *HTMLElement) InnerTextBySelectorAll(selector values.String) *values.Array
func (*HTMLElement) IsConnected ¶
func (el *HTMLElement) IsConnected() values.Boolean
func (*HTMLElement) Length ¶
func (el *HTMLElement) Length() values.Int
func (*HTMLElement) MarshalJSON ¶
func (el *HTMLElement) MarshalJSON() ([]byte, error)
func (*HTMLElement) NodeName ¶
func (el *HTMLElement) NodeName() values.String
func (*HTMLElement) NodeType ¶
func (el *HTMLElement) NodeType() values.Int
func (*HTMLElement) QuerySelector ¶
func (el *HTMLElement) QuerySelector(selector values.String) core.Value
func (*HTMLElement) QuerySelectorAll ¶
func (el *HTMLElement) QuerySelectorAll(selector values.String) core.Value
func (*HTMLElement) ScrollIntoView ¶ added in v0.5.0
func (el *HTMLElement) ScrollIntoView() error
func (*HTMLElement) String ¶
func (el *HTMLElement) String() string
func (*HTMLElement) Type ¶
func (el *HTMLElement) Type() core.Type
func (*HTMLElement) Unwrap ¶
func (el *HTMLElement) Unwrap() interface{}
func (*HTMLElement) Value ¶
func (el *HTMLElement) Value() core.Value
func (*HTMLElement) WaitForClass ¶
type HTMLElementIdentity ¶
type HTMLElementIdentity struct {
// contains filtered or unexported fields
}
type ScreenshotArgs ¶
type ScreenshotFormat ¶
type ScreenshotFormat string
const ( ScreenshotFormatPNG ScreenshotFormat = "png" ScreenshotFormatJPEG ScreenshotFormat = "jpeg" )
Click to show internal directories.
Click to hide internal directories.