Documentation
¶
Index ¶
- type Puppet
- func (c *Puppet) AttributeValue(sel string, name string) (value string, ok bool, err error)
- func (c *Puppet) Attributes(sel string) (value map[string]string, err error)
- func (c *Puppet) AttributesAll(sel string) (value []map[string]string, err error)
- func (c *Puppet) Clear(sel string) (err error)
- func (c *Puppet) ClearCache() (err error)
- func (c *Puppet) ClearCookies() (err error)
- func (c *Puppet) Click(sel string) (err error)
- func (c *Puppet) Close() error
- func (c *Puppet) CloseTarget(id string) (err error)
- func (c *Puppet) Cookies() (cookies []*http.Cookie, err error)
- func (c *Puppet) DelAttribute(sel string, name string) (err error)
- func (c *Puppet) DelCookies(name string) (err error)
- func (c *Puppet) DoubleClick(sel string) (err error)
- func (c *Puppet) Evaluate(expression string, res interface{}) (err error)
- func (c *Puppet) Focus(sel string) (err error)
- func (c *Puppet) InnerHTML() (res []byte, err error)
- func (c *Puppet) KeyAction(key string) (err error)
- func (c *Puppet) Location() (url string, err error)
- func (c *Puppet) Navigate(url string) error
- func (c *Puppet) NavigateBack() error
- func (c *Puppet) NavigateForward() error
- func (c *Puppet) NewTarget(url string) (id string, err error)
- func (c *Puppet) OuterHTML() (res []byte, err error)
- func (c *Puppet) PDF() (res []byte, err error)
- func (c *Puppet) Reload() error
- func (c *Puppet) Reset(sel string) (err error)
- func (c *Puppet) Screenshot() (res []byte, err error)
- func (c *Puppet) ScrollIntoView(sel string) (err error)
- func (c *Puppet) SendKeys(sel string, v string) (err error)
- func (c *Puppet) SetAttributeValue(sel string, name, value string) (err error)
- func (c *Puppet) SetAttributes(sel string, value map[string]string) (err error)
- func (c *Puppet) SetCookies(cookies []*http.Cookie) (err error)
- func (c *Puppet) SetHeaders(headers map[string]interface{}) (err error)
- func (c *Puppet) SetTarget(id string) (err error)
- func (c *Puppet) SetUploadFiles(sel string, files []string) (err error)
- func (c *Puppet) SetValue(sel string, value string) (err error)
- func (c *Puppet) Snapshot() (res []byte, err error)
- func (c *Puppet) Stop() error
- func (c *Puppet) Submit(sel string) (err error)
- func (c *Puppet) Targets() (tabs []string, err error)
- func (c *Puppet) Text(sel string) (value string, err error)
- func (c *Puppet) Title() (title string, err error)
- func (c *Puppet) Value(sel string) (value string, err error)
- func (c *Puppet) WaitEnabled(sel string) (err error)
- func (c *Puppet) WaitNotPresent(sel string) (err error)
- func (c *Puppet) WaitNotVisible(sel string) (err error)
- func (c *Puppet) WaitReady(sel string) (err error)
- func (c *Puppet) WaitSelected(sel string) (err error)
- func (c *Puppet) WaitVisible(sel string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Puppet ¶
type Puppet struct {
// contains filtered or unexported fields
}
Puppet DevTools Protocol browser manager, handling the
func (*Puppet) AttributeValue ¶
AttributeValue retrieves the element attribute value for the first node matching the selector.
func (*Puppet) Attributes ¶
Attributes retrieves the element attributes for the first node matching the selector.
func (*Puppet) AttributesAll ¶
AttributesAll retrieves the element attributes for all nodes matching the selector.
func (*Puppet) ClearCache ¶
ClearCache clears browser cache.
func (*Puppet) ClearCookies ¶
ClearCookies clears browser cookies.
func (*Puppet) CloseTarget ¶
CloseTarget closes the Chrome target with the specified id.
func (*Puppet) Cookies ¶
Cookies returns all browser cookies. Depending on the backend support, will return detailed cookie information in the cookies field.
func (*Puppet) DelAttribute ¶
DelAttribute removes the element attribute with name from the first node matching the selector.
func (*Puppet) DelCookies ¶
DelCookies deletes browser cookies with matching name and url or domain/path pair.
func (*Puppet) DoubleClick ¶
DoubleClick sends a mouse double click event to the first node matching the selector.
func (*Puppet) Evaluate ¶
Evaluate is an action to evaluate the Javascript expression, unmarshaling the result of the script evaluation to res.
func (*Puppet) InnerHTML ¶
InnerHTML retrieves the inner html of the first node matching the selector.
func (*Puppet) KeyAction ¶
KeyAction will synthesize a keyDown, char, and keyUp event for each rune contained in keys along with any supplied key options.
func (*Puppet) NavigateBack ¶
NavigateBack navigates the current frame backwards in its history.
func (*Puppet) NavigateForward ¶
NavigateForward navigates the current frame forwards in its history.
func (*Puppet) NewTarget ¶
NewTarget an action that creates a new Chrome target, and sets it as the active target.
func (*Puppet) OuterHTML ¶
OuterHTML retrieves the outer html of the first node matching the selector.
func (*Puppet) Reset ¶
Reset is an action that resets the form of the first node matching the selector belongs to.
func (*Puppet) Screenshot ¶
Screenshot capture page screenshot.
func (*Puppet) ScrollIntoView ¶
ScrollIntoView scrolls the window to the first node matching the selector.
func (*Puppet) SendKeys ¶
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.
func (*Puppet) SetAttributeValue ¶
SetAttributeValue sets the element attribute with name to value for the first node matching the selector.
func (*Puppet) SetAttributes ¶
SetAttributes sets the element attributes for the first node matching the selector.
func (*Puppet) SetCookies ¶
SetCookies sets given cookies.
func (*Puppet) SetHeaders ¶
SetHeaders specifies whether to always send extra HTTP headers with the requests from this page.
func (*Puppet) SetTarget ¶
SetTarget is an action that sets the active Chrome handler to the handler associated with the specified id.
func (*Puppet) SetUploadFiles ¶
SetUploadFiles sets the files to upload (ie, for a input[type="file"] node) for the first node matching the selector.
func (*Puppet) Snapshot ¶
Snapshot returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles.
func (*Puppet) Submit ¶
Submit is an action that submits the form of the first node matching the selector belongs to.
func (*Puppet) WaitEnabled ¶
WaitEnabled waits until the selected element is enabled (does not have attribute 'disabled').
func (*Puppet) WaitNotPresent ¶
WaitNotPresent waits until no elements match the specified selector.
func (*Puppet) WaitNotVisible ¶
WaitNotVisible waits until the selected element is not visible.
func (*Puppet) WaitSelected ¶
WaitSelected waits until the element is selected (has attribute 'selected').
func (*Puppet) WaitVisible ¶
WaitVisible waits until the selected element is visible.