Versions in this module Expand all Collapse all v0 v0.1.3 Mar 11, 2019 Changes in this version + const DefaultCheckDuration + const DefaultNewTargetTimeout + const DefaultPoolEndPort + const DefaultPoolStartPort + func ButtonLeft(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams + func ButtonMiddle(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams + func ButtonNone(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams + func ButtonRight(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams + func ByID(s *Selector) + func ByNodeID(s *Selector) + func ByQuery(s *Selector) + func ByQueryAll(s *Selector) + func BySearch(s *Selector) + func EvalAsValue(p *runtime.EvaluateParams) *runtime.EvaluateParams + func EvalIgnoreExceptions(p *runtime.EvaluateParams) *runtime.EvaluateParams + func EvalWithCommandLineAPI(p *runtime.EvaluateParams) *runtime.EvaluateParams + func NodeEnabled(s *Selector) + func NodeNotPresent(s *Selector) + func NodeNotVisible(s *Selector) + func NodeReady(s *Selector) + func NodeSelected(s *Selector) + func NodeVisible(s *Selector) + type Action interface + Do func(context.Context, cdp.Executor) error + func AttributeValue(sel interface{}, name string, value *string, ok *bool, opts ...QueryOption) Action + func Attributes(sel interface{}, attributes *map[string]string, opts ...QueryOption) Action + func AttributesAll(sel interface{}, attributes *[]map[string]string, opts ...QueryOption) Action + func Blur(sel interface{}, opts ...QueryOption) Action + func CaptureScreenshot(res *[]byte) Action + func Clear(sel interface{}, opts ...QueryOption) Action + func Click(sel interface{}, opts ...QueryOption) Action + func ComputedStyle(sel interface{}, style *[]*css.ComputedProperty, opts ...QueryOption) Action + func Dimensions(sel interface{}, model **dom.BoxModel, opts ...QueryOption) Action + func DoubleClick(sel interface{}, opts ...QueryOption) Action + func Evaluate(expression string, res interface{}, opts ...EvaluateOption) Action + func EvaluateAsDevTools(expression string, res interface{}, opts ...EvaluateOption) Action + func Focus(sel interface{}, opts ...QueryOption) Action + func InnerHTML(sel interface{}, html *string, opts ...QueryOption) Action + func JavascriptAttribute(sel interface{}, name string, res interface{}, opts ...QueryOption) Action + func KeyAction(keys string, opts ...KeyOption) Action + func KeyActionNode(n *cdp.Node, keys string, opts ...KeyOption) Action + func Location(urlstr *string) Action + func MatchedStyle(sel interface{}, style **css.GetMatchedStylesForNodeReturns, ...) Action + func MouseAction(typ input.MouseType, x, y int64, opts ...MouseOption) Action + func MouseClickNode(n *cdp.Node, opts ...MouseOption) Action + func MouseClickXY(x, y int64, opts ...MouseOption) Action + func Navigate(urlstr string) Action + func NavigateBack() Action + func NavigateForward() Action + func NavigateToHistoryEntry(entryID int64) Action + func NavigationEntries(currentIndex *int64, entries *[]*page.NavigationEntry) Action + func NodeIDs(sel interface{}, ids *[]cdp.NodeID, opts ...QueryOption) Action + func Nodes(sel interface{}, nodes *[]*cdp.Node, opts ...QueryOption) Action + func OuterHTML(sel interface{}, html *string, opts ...QueryOption) Action + func Query(sel interface{}, opts ...QueryOption) Action + func QueryAfter(sel interface{}, f func(context.Context, *TargetHandler, ...*cdp.Node) error, ...) Action + func Reload() Action + func RemoveAttribute(sel interface{}, name string, opts ...QueryOption) Action + func Reset(sel interface{}, opts ...QueryOption) Action + func Screenshot(sel interface{}, picbuf *[]byte, opts ...QueryOption) Action + func ScrollIntoView(sel interface{}, opts ...QueryOption) Action + func SendKeys(sel interface{}, v string, opts ...QueryOption) Action + func SetAttributeValue(sel interface{}, name, value string, opts ...QueryOption) Action + func SetAttributes(sel interface{}, attributes map[string]string, opts ...QueryOption) Action + func SetJavascriptAttribute(sel interface{}, name, value string, opts ...QueryOption) Action + func SetUploadFiles(sel interface{}, files []string, opts ...QueryOption) Action + func SetValue(sel interface{}, value string, opts ...QueryOption) Action + func Sleep(d time.Duration) Action + func Stop() Action + func Submit(sel interface{}, opts ...QueryOption) Action + func Text(sel interface{}, text *string, opts ...QueryOption) Action + func Title(title *string) Action + func Value(sel interface{}, value *string, opts ...QueryOption) Action + func WaitEnabled(sel interface{}, opts ...QueryOption) Action + func WaitNotPresent(sel interface{}, opts ...QueryOption) Action + func WaitNotVisible(sel interface{}, opts ...QueryOption) Action + func WaitReady(sel interface{}, opts ...QueryOption) Action + func WaitSelected(sel interface{}, opts ...QueryOption) Action + func WaitVisible(sel interface{}, opts ...QueryOption) Action + type ActionFunc func(context.Context, cdp.Executor) error + func CallbackFunc(method string, f func(interface{}, *TargetHandler)) ActionFunc + func (f ActionFunc) Do(ctxt context.Context, h cdp.Executor) error + type CDP struct + func New(ctxt context.Context, opts ...Option) (*CDP, error) + func (c *CDP) AddTarget(ctxt context.Context, t client.Target) + func (c *CDP) CloseByID(id string) Action + func (c *CDP) CloseByIndex(i int) Action + func (c *CDP) GetHandlerByID(id string) cdp.Executor + func (c *CDP) GetHandlerByIndex(i int) cdp.Executor + func (c *CDP) ListTargets() []string + func (c *CDP) NewTarget(id *string, opts ...client.Option) Action + func (c *CDP) Run(ctxt context.Context, a Action) error + func (c *CDP) SetHandler(i int) error + func (c *CDP) SetHandlerByID(id string) error + func (c *CDP) SetTarget(i int) Action + func (c *CDP) SetTargetByID(id string) Action + func (c *CDP) Shutdown(ctxt context.Context, opts ...client.Option) error + func (c *CDP) Wait() error + type Error string + const ErrChannelClosed + const ErrDisabled + const ErrHasResults + const ErrInvalidBoxModel + const ErrInvalidDimensions + const ErrInvalidHandler + const ErrNoResults + const ErrNotSelected + const ErrNotVisible + const ErrVisible + func (err Error) Error() string + type EvaluateOption func(*runtime.EvaluateParams) *runtime.EvaluateParams + func EvalObjectGroup(objectGroup string) EvaluateOption + type KeyOption func(*input.DispatchKeyEventParams) *input.DispatchKeyEventParams + func KeyModifiers(modifiers ...input.Modifier) KeyOption + type MouseOption func(*input.DispatchMouseEventParams) *input.DispatchMouseEventParams + func Button(btn string) MouseOption + func ButtonModifiers(modifiers ...input.Modifier) MouseOption + func ButtonType(button input.ButtonType) MouseOption + func ClickCount(n int) MouseOption + type Option func(*CDP) error + func WithClient(ctxt context.Context, cl *client.Client) Option + func WithConsolef(f func(string, ...interface{})) Option + func WithDebugf(f func(string, ...interface{})) Option + func WithErrorf(f func(string, ...interface{})) Option + func WithLog(f func(string, ...interface{})) Option + func WithLogf(f func(string, ...interface{})) Option + func WithRunner(r *runner.Runner) Option + func WithRunnerOptions(opts ...runner.CommandLineOption) Option + func WithTargets(watch <-chan client.Target) Option + func WithURL(ctxt context.Context, urlstr string) Option + type Pool struct + func NewPool(opts ...PoolOption) (*Pool, error) + func (p *Pool) Allocate(ctxt context.Context, opts ...runner.CommandLineOption) (*Res, error) + func (p *Pool) Shutdown() error + type PoolOption func(*Pool) error + func PoolLog(logf, debugf, errf func(string, ...interface{})) PoolOption + func PortRange(start, end int) PoolOption + type QueryOption func(*Selector) + func After(f func(context.Context, *TargetHandler, ...*cdp.Node) error) QueryOption + func AtLeast(n int) QueryOption + func ByFunc(f func(context.Context, *TargetHandler, *cdp.Node) ([]cdp.NodeID, error)) QueryOption + func WaitFunc(...) QueryOption + type Res struct + func (r *Res) CDP() *CDP + func (r *Res) Port() int + func (r *Res) Release() error + func (r *Res) Run(ctxt context.Context, a Action) error + func (r *Res) URL() string + type Selector struct + func (s *Selector) Do(ctxt context.Context, h cdp.Executor) error + type TargetHandler struct + Callbacks map[string]func(interface{}, *TargetHandler) + CurFrameId cdp.FrameID + func NewTargetHandler(t client.Target, logf, debugf, errf func(string, ...interface{})) (*TargetHandler, error) + func (h *TargetHandler) Execute(ctxt context.Context, methodType string, params json.Marshaler, ...) error + func (h *TargetHandler) GetRoot(ctxt context.Context) (*cdp.Node, error) + func (h *TargetHandler) Run(ctxt context.Context) error + func (h *TargetHandler) SetActive(ctxt context.Context, id cdp.FrameID) error + func (h *TargetHandler) WaitFrame(ctxt context.Context, id cdp.FrameID) (*cdp.Frame, error) + func (h *TargetHandler) WaitNode(ctxt context.Context, f *cdp.Frame, id cdp.NodeID) (*cdp.Node, error) + type Tasks []Action + func (t Tasks) Do(ctxt context.Context, h cdp.Executor) error