chromedp: github.com/knq/chromedp Index | Files | Directories

package chromedp

import "github.com/knq/chromedp"

Package chromedp is a high level Chrome DevTools Protocol client that simplifies driving browsers for scraping, unit testing, or profiling web pages using the CDP.

chromedp requires no third-party dependencies, implementing the async Chrome DevTools Protocol entirely in Go.

Index

Package Files

actions.go chromedp.go errors.go eval.go handler.go input.go js.go nav.go pool.go query.go sel.go util.go

Constants

const (
    // DefaultNewTargetTimeout is the default time to wait for a new target to
    // be started.
    DefaultNewTargetTimeout = 3 * time.Second

    // DefaultCheckDuration is the default time to sleep between a check.
    DefaultCheckDuration = 50 * time.Millisecond

    // DefaultPoolStartPort is the default start port number.
    DefaultPoolStartPort = 9000

    // DefaultPoolEndPort is the default end port number.
    DefaultPoolEndPort = 10000
)

func ButtonLeft Uses

func ButtonLeft(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams

ButtonLeft is a mouse action option to set the button clicked as the left mouse button.

func ButtonMiddle Uses

func ButtonMiddle(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams

ButtonMiddle is a mouse action option to set the button clicked as the middle mouse button.

func ButtonNone Uses

func ButtonNone(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams

ButtonNone is a mouse action option to set the button clicked as none (used for mouse movements).

func ButtonRight Uses

func ButtonRight(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams

ButtonRight is a mouse action option to set the button clicked as the right mouse button.

func ByID Uses

func ByID(s *Selector)

ByID is a query option to select a single element by their CSS #id.

func ByNodeID Uses

func ByNodeID(s *Selector)

ByNodeID is a query option to select elements by their NodeIDs.

func ByQuery Uses

func ByQuery(s *Selector)

ByQuery is a query option to select a single element using DOM.querySelector.

func ByQueryAll Uses

func ByQueryAll(s *Selector)

ByQueryAll is a query option to select elements by DOM.querySelectorAll.

func BySearch Uses

func BySearch(s *Selector)

BySearch is a query option via DOM.performSearch (works with both CSS and XPath queries).

func EvalAsValue Uses

func EvalAsValue(p *runtime.EvaluateParams) *runtime.EvaluateParams

EvalAsValue is a evaluate option that will cause the evaluated script to encode the result of the expression as a JSON-encoded value.

func EvalIgnoreExceptions Uses

func EvalIgnoreExceptions(p *runtime.EvaluateParams) *runtime.EvaluateParams

EvalIgnoreExceptions is a evaluate option that will cause script evaluation to ignore exceptions.

func EvalWithCommandLineAPI Uses

func EvalWithCommandLineAPI(p *runtime.EvaluateParams) *runtime.EvaluateParams

EvalWithCommandLineAPI is an evaluate option to make the DevTools Command Line API available to the evaluated script.

Note: this should not be used with untrusted Javascript.

func NodeEnabled Uses

func NodeEnabled(s *Selector)

NodeEnabled is a query option to wait until the element is enabled.

func NodeNotPresent Uses

func NodeNotPresent(s *Selector)

NodeNotPresent is a query option to wait until no elements match are present matching the selector.

func NodeNotVisible Uses

func NodeNotVisible(s *Selector)

NodeNotVisible is a query option to wait until the element is not visible.

func NodeReady Uses

func NodeReady(s *Selector)

NodeReady is a query option to wait until the element is ready.

func NodeSelected Uses

func NodeSelected(s *Selector)

NodeSelected is a query option to wait until the element is selected.

func NodeVisible Uses

func NodeVisible(s *Selector)

NodeVisible is a query option to wait until the element is visible.

type Action Uses

type Action interface {
    // Do executes the action using the provided context and frame handler.
    Do(context.Context, cdp.Executor) error
}

Action is the common interface for an action that will be executed against a context and frame handler.

func AttributeValue Uses

func AttributeValue(sel interface{}, name string, value *string, ok *bool, opts ...QueryOption) Action

AttributeValue retrieves the element attribute value for the first node matching the selector.

func Attributes Uses

func Attributes(sel interface{}, attributes *map[string]string, opts ...QueryOption) Action

Attributes retrieves the element attributes for the first node matching the selector.

func AttributesAll Uses

func AttributesAll(sel interface{}, attributes *[]map[string]string, opts ...QueryOption) Action

AttributesAll retrieves the element attributes for all nodes matching the selector.

Note: this should be used with the ByQueryAll selector option.

func Blur Uses

func Blur(sel interface{}, opts ...QueryOption) Action

Blur unfocuses (blurs) the first node matching the selector.

func CaptureScreenshot Uses

func CaptureScreenshot(res *[]byte) Action

CaptureScreenshot captures takes a screenshot of the current viewport.

Note: this an alias for page.CaptureScreenshot.

func Clear Uses

func Clear(sel interface{}, opts ...QueryOption) Action

Clear clears the values of any input/textarea nodes matching the selector.

func Click Uses

func Click(sel interface{}, opts ...QueryOption) Action

Click sends a mouse click event to the first node matching the selector.

func ComputedStyle Uses

func ComputedStyle(sel interface{}, style *[]*css.ComputedProperty, opts ...QueryOption) Action

ComputedStyle retrieves the computed style of the first node matching the selector.

func Dimensions Uses

func Dimensions(sel interface{}, model **dom.BoxModel, opts ...QueryOption) Action

Dimensions retrieves the box model dimensions for the first node matching the selector.

func DoubleClick Uses

func DoubleClick(sel interface{}, opts ...QueryOption) Action

DoubleClick sends a mouse double click event to the first node matching the selector.

func Evaluate Uses

func Evaluate(expression string, res interface{}, opts ...EvaluateOption) Action

Evaluate is an action to evaluate the Javascript expression, unmarshaling the result of the script evaluation to res.

When res is a type other than *[]byte, or **chromedp/cdp/runtime.RemoteObject, then the result of the script evaluation will be returned "by value" (ie, JSON-encoded), and subsequently an attempt will be made to json.Unmarshal the script result to res.

Otherwise, when res is a *[]byte, the raw JSON-encoded value of the script result will be placed in res. Similarly, if res is a *runtime.RemoteObject, then res will be set to the low-level protocol type, and no attempt will be made to convert the result.

Note: any exception encountered will be returned as an error.

func EvaluateAsDevTools Uses

func EvaluateAsDevTools(expression string, res interface{}, opts ...EvaluateOption) Action

EvaluateAsDevTools is an action that evaluates a Javascript expression as Chrome DevTools would, evaluating the expression in the "console" context, and making the Command Line API available to the script.

Note: this should not be used with untrusted Javascript.

func Focus Uses

func Focus(sel interface{}, opts ...QueryOption) Action

Focus focuses the first node matching the selector.

func InnerHTML Uses

func InnerHTML(sel interface{}, html *string, opts ...QueryOption) Action

InnerHTML retrieves the inner html of the first node matching the selector.

func JavascriptAttribute Uses

func JavascriptAttribute(sel interface{}, name string, res interface{}, opts ...QueryOption) Action

JavascriptAttribute retrieves the Javascript attribute for the first node matching the selector.

func KeyAction Uses

func KeyAction(keys string, opts ...KeyOption) Action

KeyAction will synthesize a keyDown, char, and keyUp event for each rune contained in keys along with any supplied key options.

Only well-known, "printable" characters will have char events synthesized.

Please see the chromedp/kb package for implementation details and the list of well-known keys.

func KeyActionNode Uses

func KeyActionNode(n *cdp.Node, keys string, opts ...KeyOption) Action

KeyActionNode dispatches a key event on a node.

func Location Uses

func Location(urlstr *string) Action

Location retrieves the document location.

func MatchedStyle Uses

func MatchedStyle(sel interface{}, style **css.GetMatchedStylesForNodeReturns, opts ...QueryOption) Action

MatchedStyle retrieves the matched style information for the first node matching the selector.

func MouseAction Uses

func MouseAction(typ input.MouseType, x, y int64, opts ...MouseOption) Action

MouseAction is a mouse action.

func MouseClickNode Uses

func MouseClickNode(n *cdp.Node, opts ...MouseOption) Action

MouseClickNode dispatches a mouse left button click event at the center of a specified node.

Note that the window will be scrolled if the node is not within the window's viewport.

func MouseClickXY Uses

func MouseClickXY(x, y int64, opts ...MouseOption) Action

MouseClickXY sends a left mouse button click (ie, mousePressed and mouseReleased event) at the X, Y location.

func Navigate(urlstr string) Action

Navigate navigates the current frame.

func NavigateBack() Action

NavigateBack navigates the current frame backwards in its history.

func NavigateForward() Action

NavigateForward navigates the current frame forwards in its history.

func NavigateToHistoryEntry(entryID int64) Action

NavigateToHistoryEntry is an action to navigate to the specified navigation entry.

func NavigationEntries(currentIndex *int64, entries *[]*page.NavigationEntry) Action

NavigationEntries is an action to retrieve the page's navigation history entries.

func NodeIDs Uses

func NodeIDs(sel interface{}, ids *[]cdp.NodeID, opts ...QueryOption) Action

NodeIDs retrieves the node IDs matching the selector.

func Nodes Uses

func Nodes(sel interface{}, nodes *[]*cdp.Node, opts ...QueryOption) Action

Nodes retrieves the document nodes matching the selector.

func OuterHTML Uses

func OuterHTML(sel interface{}, html *string, opts ...QueryOption) Action

OuterHTML retrieves the outer html of the first node matching the selector.

func Query Uses

func Query(sel interface{}, opts ...QueryOption) Action

Query is an action to query for document nodes match the specified sel and the supplied query options.

func QueryAfter Uses

func QueryAfter(sel interface{}, f func(context.Context, *TargetHandler, ...*cdp.Node) error, opts ...QueryOption) Action

QueryAfter is an action that will match the specified sel using the supplied query options, and after the visibility conditions of the query have been met, will execute f.

func Reload Uses

func Reload() Action

Reload reloads the current page.

func RemoveAttribute Uses

func RemoveAttribute(sel interface{}, name string, opts ...QueryOption) Action

RemoveAttribute removes the element attribute with name from the first node matching the selector.

func Reset Uses

func Reset(sel interface{}, opts ...QueryOption) Action

Reset is an action that resets the form of the first node matching the selector belongs to.

func Screenshot Uses

func Screenshot(sel interface{}, picbuf *[]byte, opts ...QueryOption) Action

Screenshot takes a screenshot of the first node matching the selector.

func ScrollIntoView Uses

func ScrollIntoView(sel interface{}, opts ...QueryOption) Action

ScrollIntoView scrolls the window to the first node matching the selector.

func SendKeys Uses

func SendKeys(sel interface{}, v string, opts ...QueryOption) Action

SendKeys synthesizes the key up, char, and down events as needed for the runes in v, sending them to the first node matching the selector.

Note: when selector matches a input[type="file"] node, then dom.SetFileInputFiles is used to set the upload path of the input node to v.

func SetAttributeValue Uses

func SetAttributeValue(sel interface{}, name, value string, opts ...QueryOption) Action

SetAttributeValue sets the element attribute with name to value for the first node matching the selector.

func SetAttributes Uses

func SetAttributes(sel interface{}, attributes map[string]string, opts ...QueryOption) Action

SetAttributes sets the element attributes for the first node matching the selector.

func SetJavascriptAttribute Uses

func SetJavascriptAttribute(sel interface{}, name, value string, opts ...QueryOption) Action

SetJavascriptAttribute sets the javascript attribute for the first node matching the selector.

func SetUploadFiles Uses

func SetUploadFiles(sel interface{}, files []string, opts ...QueryOption) Action

SetUploadFiles sets the files to upload (ie, for a input[type="file"] node) for the first node matching the selector.

func SetValue Uses

func SetValue(sel interface{}, value string, opts ...QueryOption) Action

SetValue sets the value of an element.

func Sleep Uses

func Sleep(d time.Duration) Action

Sleep is an empty action that calls time.Sleep with the specified duration.

Note: this is a temporary action definition for convenience, and will likely be marked for deprecation in the future, after the remaining Actions have been able to be written/tested.

func Stop Uses

func Stop() Action

Stop stops all navigation and pending resource retrieval.

func Submit Uses

func Submit(sel interface{}, opts ...QueryOption) Action

Submit is an action that submits the form of the first node matching the selector belongs to.

func Text Uses

func Text(sel interface{}, text *string, opts ...QueryOption) Action

Text retrieves the visible text of the first node matching the selector.

func Title Uses

func Title(title *string) Action

Title retrieves the document title.

func Value Uses

func Value(sel interface{}, value *string, opts ...QueryOption) Action

Value retrieves the value of the first node matching the selector.

func WaitEnabled Uses

func WaitEnabled(sel interface{}, opts ...QueryOption) Action

WaitEnabled waits until the selected element is enabled (does not have attribute 'disabled').

func WaitNotPresent Uses

func WaitNotPresent(sel interface{}, opts ...QueryOption) Action

WaitNotPresent waits until no elements match the specified selector.

func WaitNotVisible Uses

func WaitNotVisible(sel interface{}, opts ...QueryOption) Action

WaitNotVisible waits until the selected element is not visible.

func WaitReady Uses

func WaitReady(sel interface{}, opts ...QueryOption) Action

WaitReady waits until the element is ready (ie, loaded by chromedp).

func WaitSelected Uses

func WaitSelected(sel interface{}, opts ...QueryOption) Action

WaitSelected waits until the element is selected (has attribute 'selected').

func WaitVisible Uses

func WaitVisible(sel interface{}, opts ...QueryOption) Action

WaitVisible waits until the selected element is visible.

type ActionFunc Uses

type ActionFunc func(context.Context, cdp.Executor) error

ActionFunc is a adapter to allow the use of ordinary func's as an Action.

func (ActionFunc) Do Uses

func (f ActionFunc) Do(ctxt context.Context, h cdp.Executor) error

Do executes the func f using the provided context and frame handler.

type CDP Uses

type CDP struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

CDP is the high-level Chrome DevTools Protocol browser manager, handling the browser process runner, WebSocket clients, associated targets, and network, page, and DOM events.

func New Uses

func New(ctxt context.Context, opts ...Option) (*CDP, error)

New creates and starts a new CDP instance.

func (*CDP) AddTarget Uses

func (c *CDP) AddTarget(ctxt context.Context, t client.Target)

AddTarget adds a target using the supplied context.

func (*CDP) CloseByID Uses

func (c *CDP) CloseByID(id string) Action

CloseByID closes the Chrome target with the specified id.

func (*CDP) CloseByIndex Uses

func (c *CDP) CloseByIndex(i int) Action

CloseByIndex closes the Chrome target with specified index i.

func (*CDP) GetHandlerByID Uses

func (c *CDP) GetHandlerByID(id string) cdp.Executor

GetHandlerByID retrieves the domains manager for the specified target ID.

func (*CDP) GetHandlerByIndex Uses

func (c *CDP) GetHandlerByIndex(i int) cdp.Executor

GetHandlerByIndex retrieves the domains manager for the specified index.

func (*CDP) ListTargets Uses

func (c *CDP) ListTargets() []string

ListTargets returns the target IDs of the managed targets.

func (*CDP) NewTarget Uses

func (c *CDP) NewTarget(id *string, opts ...client.Option) Action

NewTarget is an action that creates a new Chrome target, and sets it as the active target.

func (*CDP) Run Uses

func (c *CDP) Run(ctxt context.Context, a Action) error

Run executes the action against the current target using the supplied context.

func (*CDP) SetHandler Uses

func (c *CDP) SetHandler(i int) error

SetHandler sets the active handler to the target with the specified index.

func (*CDP) SetHandlerByID Uses

func (c *CDP) SetHandlerByID(id string) error

SetHandlerByID sets the active target to the target with the specified id.

func (*CDP) SetTarget Uses

func (c *CDP) SetTarget(i int) Action

SetTarget is an action that sets the active Chrome handler to the specified index i.

func (*CDP) SetTargetByID Uses

func (c *CDP) SetTargetByID(id string) Action

SetTargetByID is an action that sets the active Chrome handler to the handler associated with the specified id.

func (*CDP) Shutdown Uses

func (c *CDP) Shutdown(ctxt context.Context, opts ...client.Option) error

Shutdown closes all Chrome page handlers.

func (*CDP) Wait Uses

func (c *CDP) Wait() error

Wait waits for the Chrome runner to terminate.

type Error Uses

type Error string

Error is a chromedp error.

const (
    // ErrInvalidDimensions is the invalid dimensions error.
    ErrInvalidDimensions Error = "invalid dimensions"

    // ErrNoResults is the no results error.
    ErrNoResults Error = "no results"

    // ErrHasResults is the has results error.
    ErrHasResults Error = "has results"

    // ErrNotVisible is the not visible error.
    ErrNotVisible Error = "not visible"

    // ErrVisible is the visible error.
    ErrVisible Error = "visible"

    // ErrDisabled is the disabled error.
    ErrDisabled Error = "disabled"

    // ErrNotSelected is the not selected error.
    ErrNotSelected Error = "not selected"

    // ErrInvalidBoxModel is the invalid box model error.
    ErrInvalidBoxModel Error = "invalid box model"

    // ErrChannelClosed is the channel closed error.
    ErrChannelClosed Error = "channel closed"

    // ErrInvalidHandler is the invalid handler error.
    ErrInvalidHandler Error = "invalid handler"
)

Error types.

func (Error) Error Uses

func (err Error) Error() string

Error satisfies the error interface.

type EvaluateOption Uses

type EvaluateOption func(*runtime.EvaluateParams) *runtime.EvaluateParams

EvaluateOption is the type for script evaluation options.

func EvalObjectGroup Uses

func EvalObjectGroup(objectGroup string) EvaluateOption

EvalObjectGroup is a evaluate option to set the object group.

type KeyOption Uses

type KeyOption func(*input.DispatchKeyEventParams) *input.DispatchKeyEventParams

KeyOption is a key action option.

func KeyModifiers Uses

func KeyModifiers(modifiers ...input.Modifier) KeyOption

KeyModifiers is a key action option to add additional modifiers on the key press.

type MouseOption Uses

type MouseOption func(*input.DispatchMouseEventParams) *input.DispatchMouseEventParams

MouseOption is a mouse action option.

func Button Uses

func Button(btn string) MouseOption

Button is a mouse action option to set the button to click from a string.

func ButtonModifiers Uses

func ButtonModifiers(modifiers ...input.Modifier) MouseOption

ButtonModifiers is a mouse action option to add additional input modifiers for a button click.

func ButtonType Uses

func ButtonType(button input.ButtonType) MouseOption

ButtonType is a mouse action option to set the button to click.

func ClickCount Uses

func ClickCount(n int) MouseOption

ClickCount is a mouse action option to set the click count.

type Option Uses

type Option func(*CDP) error

Option is a Chrome DevTools Protocol option.

func WithClient Uses

func WithClient(ctxt context.Context, cl *client.Client) Option

WithClient is a CDP option to use the incoming targets from a client.

func WithConsolef Uses

func WithConsolef(f func(string, ...interface{})) Option

WithConsolef is a CDP option to specify a func to receive chrome log events.

Note: NOT YET IMPLEMENTED.

func WithDebugf Uses

func WithDebugf(f func(string, ...interface{})) Option

WithDebugf is a CDP option to specify a func to receive debug logging (ie, protocol information).

func WithErrorf Uses

func WithErrorf(f func(string, ...interface{})) Option

WithErrorf is a CDP option to specify a func to receive error logging.

func WithLog Uses

func WithLog(f func(string, ...interface{})) Option

WithLog is a CDP option that sets the logging, debugging, and error funcs to f.

func WithLogf Uses

func WithLogf(f func(string, ...interface{})) Option

WithLogf is a CDP option to specify a func to receive general logging.

func WithRunner Uses

func WithRunner(r *runner.Runner) Option

WithRunner is a CDP option to specify the underlying Chrome runner to monitor for page handlers.

func WithRunnerOptions Uses

func WithRunnerOptions(opts ...runner.CommandLineOption) Option

WithRunnerOptions is a CDP option to specify the options to pass to a newly created Chrome process runner.

func WithTargets Uses

func WithTargets(watch <-chan client.Target) Option

WithTargets is a CDP option to specify the incoming targets to monitor for page handlers.

func WithURL Uses

func WithURL(ctxt context.Context, urlstr string) Option

WithURL is a CDP option to use a client with the specified URL.

type Pool Uses

type Pool struct {
    // contains filtered or unexported fields
}

Pool manages a pool of running Chrome processes.

func NewPool Uses

func NewPool(opts ...PoolOption) (*Pool, error)

NewPool creates a new Chrome runner pool.

func (*Pool) Allocate Uses

func (p *Pool) Allocate(ctxt context.Context, opts ...runner.CommandLineOption) (*Res, error)

Allocate creates a new process runner and returns it.

func (*Pool) Shutdown Uses

func (p *Pool) Shutdown() error

Shutdown releases all the pool resources.

type PoolOption Uses

type PoolOption func(*Pool) error

PoolOption is a pool option.

func PoolLog Uses

func PoolLog(logf, debugf, errf func(string, ...interface{})) PoolOption

PoolLog is a pool option to set the logging to use for the pool.

func PortRange Uses

func PortRange(start, end int) PoolOption

PortRange is a pool option to set the port range to use.

type QueryOption Uses

type QueryOption func(*Selector)

QueryOption is a element query selector option.

func After Uses

func After(f func(context.Context, *TargetHandler, ...*cdp.Node) error) QueryOption

After is a query option to set a func that will be executed after the wait has succeeded.

func AtLeast Uses

func AtLeast(n int) QueryOption

AtLeast is a query option to wait until at least n elements are returned from the query selector.

func ByFunc Uses

func ByFunc(f func(context.Context, *TargetHandler, *cdp.Node) ([]cdp.NodeID, error)) QueryOption

ByFunc is a query option to set the func used to select elements.

func WaitFunc Uses

func WaitFunc(wait func(context.Context, *TargetHandler, *cdp.Node, ...cdp.NodeID) ([]*cdp.Node, error)) QueryOption

WaitFunc is a query option to set a custom wait func.

type Res Uses

type Res struct {
    // contains filtered or unexported fields
}

Res is a pool resource.

func (*Res) CDP Uses

func (r *Res) CDP() *CDP

CDP returns the actual CDP instance.

func (*Res) Port Uses

func (r *Res) Port() int

Port returns the allocated port for the pool resource.

func (*Res) Release Uses

func (r *Res) Release() error

Release releases the pool resource.

func (*Res) Run Uses

func (r *Res) Run(ctxt context.Context, a Action) error

Run runs an action.

func (*Res) URL Uses

func (r *Res) URL() string

URL returns a formatted URL for the pool resource.

type Selector Uses

type Selector struct {
    // contains filtered or unexported fields
}

Selector holds information pertaining to an element query select action.

func (*Selector) Do Uses

func (s *Selector) Do(ctxt context.Context, h cdp.Executor) error

Do satisfies the Action interface.

type TargetHandler Uses

type TargetHandler struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

TargetHandler manages a Chrome DevTools Protocol target.

func NewTargetHandler Uses

func NewTargetHandler(t client.Target, logf, debugf, errf func(string, ...interface{})) (*TargetHandler, error)

NewTargetHandler creates a new handler for the specified client target.

func (*TargetHandler) Execute Uses

func (h *TargetHandler) Execute(ctxt context.Context, methodType string, params json.Marshaler, res json.Unmarshaler) error

Execute executes commandType against the endpoint passed to Run, using the provided context and params, decoding the result of the command to res.

func (*TargetHandler) GetRoot Uses

func (h *TargetHandler) GetRoot(ctxt context.Context) (*cdp.Node, error)

GetRoot returns the current top level frame's root document node.

func (*TargetHandler) Run Uses

func (h *TargetHandler) Run(ctxt context.Context) error

Run starts the processing of commands and events of the client target provided to NewTargetHandler.

Callers can stop Run by closing the passed context.

func (*TargetHandler) SetActive Uses

func (h *TargetHandler) SetActive(ctxt context.Context, id cdp.FrameID) error

SetActive sets the currently active frame after a successful navigation.

func (*TargetHandler) WaitFrame Uses

func (h *TargetHandler) WaitFrame(ctxt context.Context, id cdp.FrameID) (*cdp.Frame, error)

WaitFrame waits for a frame to be loaded using the provided context.

func (*TargetHandler) WaitNode Uses

func (h *TargetHandler) WaitNode(ctxt context.Context, f *cdp.Frame, id cdp.NodeID) (*cdp.Node, error)

WaitNode waits for a node to be loaded using the provided context.

type Tasks Uses

type Tasks []Action

Tasks is a sequential list of Actions that can be used as a single Action.

func (Tasks) Do Uses

func (t Tasks) Do(ctxt context.Context, h cdp.Executor) error

Do executes the list of Actions sequentially, using the provided context and frame handler.

Directories

PathSynopsis
clientPackage client provides the low level Chrome DevTools Protocol client.
kbPackage kb provides keyboard mappings for Chrome DOM Keys for use with input events.
runnerPackage runner provides a Chrome process runner.

Package chromedp imports 29 packages (graph) and is imported by 2 packages. Updated 2019-03-06. Refresh now. Tools for package owners.