Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidArgs = errors.New("invalid args") ErrInvalidResponse = errors.New("invalid response") )
View Source
var Browser = struct { Close string GetVersion string }{ "Browser.close", "Browser.getVersion", }
View Source
var DOM = struct { Enable string Disable string DescribeNode string GetAttributes string GetDocument string GetFlattenedDocument string GetNodeForLocation string GetOuterHTML string PerformSearch string QuerySelector string QuerySelectorAll string RemoveAttribute string RemoveNode string RequestChildNodes string RequestNode string ResolveNode string SetAttributeValue string SetAttributesAsText string SetFileInputFiles string SetNodeName string SetNodeValue string SetOuterHTML string DocumentUpdated string }{ "DOM.enable", "DOM.disable", "DOM.describeNode", "DOM.getAttributes", "DOM.getDocument", "DOM.getFlattenedDocument", "DOM.getNodeForLocation", "DOM.getOuterHTML", "DOM.performSearch", "DOM.querySelector", "DOM.querySelectorAll", "DOM.removeAttribute", "DOM.removeNode", "DOM.requestChildNodes", "DOM.requestNode", "DOM.resolveNode", "DOM.setAttributeValue", "DOM.setAttributesAsText", "DOM.setFileInputFiles", "DOM.setNodeName", "DOM.setNodeValue", "DOM.setOuterHTML", "DOM.documentUpdated", }
View Source
var Input = struct { DispatchKeyEvent string DispatchMouseEvent string DispatchTouchEvent string EmulateTouchFromMouseEvent string SetIgnoreInputEvents string SynthesizePinchGesture string SynthesizeScrollGesture string SynthesizeTapGesture string }{ "Input.dispatchKeyEvent", "Input.dispatchMouseEvent", "Input.dispatchTouchEvent", "Input.emulateTouchFromMouseEvent", "Input.setIgnoreInputEvents", "Input.synthesizePinchGesture", "Input.synthesizeScrollGesture", "Input.synthesizeTapGesture", }
View Source
var Page = struct { Enable string Disable string BringToFront string CaptureScreenshot string Close string DeleteCookie string GetCookies string Navigate string PrintToPDF string Reload string StopLoading string DomContentEventFired string FrameAttached string FrameDetached string FrameNavigated string FrameStartedLoading string FrameStoppedLoading string LifecycleEvent string LoadEventFired string }{ "Page.enable", "Page.disable", "Page.bringToFront", "Page.captureScreenshot", "Page.close", "Page.deleteCookie", "Page.getCookies", "Page.navigate", "Page.printToPDF", "Page.reload", "Page.stopLoading", "Page.domContentEventFired", "Page.frameAttached", "Page.frameDetached", "Page.frameNavigated", "Page.frameStartedLoading", "Page.frameStoppedLoading", "Page.lifecycleEvent", "Page.loadEventFired", }
Functions ¶
This section is empty.
Types ¶
type EvaluateAction ¶
type Message ¶
type Message struct { // 请求的ID,响应中会带有相同的ID, // 事件通知没有该字段 Id int32 `json:"id,omitempty"` // 请求、响应和事件通知都有该字段 Method string `json:"method,omitempty"` // 请求的参数(可选)、事件通知的数据(可选), // 响应没有该字段 Params Params `json:"params,omitempty"` // 响应数据(请求和事件通知没有该字段) Result Result `json:"result,omitempty"` // contains filtered or unexported fields }
type SimpleAction ¶
type SimpleAction struct {
// contains filtered or unexported fields
}
func NewAction ¶
func NewAction(method string, params ...Params) *SimpleAction
func (*SimpleAction) Method ¶
func (sa *SimpleAction) Method() string
func (*SimpleAction) Params ¶
func (sa *SimpleAction) Params() Params
type SimpleEvaluateAction ¶
type SimpleEvaluateAction struct {
// contains filtered or unexported fields
}
func NewEvaluateAction ¶
func NewEvaluateAction(expression string, handler func(Result) error) *SimpleEvaluateAction
func (*SimpleEvaluateAction) Expressions ¶
func (sea *SimpleEvaluateAction) Expressions() []string
func (*SimpleEvaluateAction) Handle ¶
func (sea *SimpleEvaluateAction) Handle(result Result) error
func (*SimpleEvaluateAction) Method ¶
func (sea *SimpleEvaluateAction) Method() string
func (*SimpleEvaluateAction) Params ¶
func (sea *SimpleEvaluateAction) Params() Params
type Tab ¶
type Tab struct { // WebSocket上读取到的数据经过处理后发送给该channel C chan *Message // contains filtered or unexported fields }
func (*Tab) Unsubscribe ¶
Click to show internal directories.
Click to hide internal directories.