Documentation ¶
Index ¶
- Variables
- func AttributeGet(ctx context.Context, args ...core.Value) (core.Value, error)
- func AttributeRemove(ctx context.Context, args ...core.Value) (core.Value, error)
- func AttributeSet(ctx context.Context, args ...core.Value) (core.Value, error)
- func Blur(ctx context.Context, args ...core.Value) (core.Value, error)
- func Click(ctx context.Context, args ...core.Value) (core.Value, error)
- func ClickAll(ctx context.Context, args ...core.Value) (core.Value, error)
- func CookieDel(ctx context.Context, args ...core.Value) (core.Value, error)
- func CookieGet(ctx context.Context, args ...core.Value) (core.Value, error)
- func CookieSet(ctx context.Context, args ...core.Value) (core.Value, error)
- func Download(_ context.Context, args ...core.Value) (core.Value, error)
- func Element(ctx context.Context, args ...core.Value) (core.Value, error)
- func ElementExists(ctx context.Context, args ...core.Value) (core.Value, error)
- func Elements(ctx context.Context, args ...core.Value) (core.Value, error)
- func ElementsCount(ctx context.Context, args ...core.Value) (core.Value, error)
- func Focus(ctx context.Context, args ...core.Value) (core.Value, error)
- func Frames(ctx context.Context, args ...core.Value) (core.Value, error)
- func GetInnerHTML(ctx context.Context, args ...core.Value) (core.Value, error)
- func GetInnerHTMLAll(ctx context.Context, args ...core.Value) (core.Value, error)
- func GetInnerText(ctx context.Context, args ...core.Value) (core.Value, error)
- func GetInnerTextAll(ctx context.Context, args ...core.Value) (core.Value, error)
- func Hover(ctx context.Context, args ...core.Value) (core.Value, error)
- func Input(ctx context.Context, args ...core.Value) (core.Value, error)
- func InputClear(ctx context.Context, args ...core.Value) (core.Value, error)
- func MouseMoveXY(ctx context.Context, args ...core.Value) (core.Value, error)
- func Navigate(ctx context.Context, args ...core.Value) (core.Value, error)
- func NavigateBack(ctx context.Context, args ...core.Value) (core.Value, error)
- func NavigateForward(ctx context.Context, args ...core.Value) (core.Value, error)
- func Open(ctx context.Context, args ...core.Value) (core.Value, error)
- func OpenOrCastPage(ctx context.Context, value core.Value) (drivers.HTMLPage, bool, error)
- func PDF(ctx context.Context, args ...core.Value) (core.Value, error)
- func Pagination(_ context.Context, args ...core.Value) (core.Value, error)
- func Parse(ctx context.Context, args ...core.Value) (core.Value, error)
- func RegisterLib(ns core.Namespace) error
- func Screenshot(ctx context.Context, args ...core.Value) (core.Value, error)
- func ScrollBottom(ctx context.Context, args ...core.Value) (core.Value, error)
- func ScrollInto(ctx context.Context, args ...core.Value) (core.Value, error)
- func ScrollTop(ctx context.Context, args ...core.Value) (core.Value, error)
- func ScrollXY(ctx context.Context, args ...core.Value) (core.Value, error)
- func Select(ctx context.Context, args ...core.Value) (core.Value, error)
- func SetInnerHTML(ctx context.Context, args ...core.Value) (core.Value, error)
- func SetInnerText(ctx context.Context, args ...core.Value) (core.Value, error)
- func StyleGet(ctx context.Context, args ...core.Value) (core.Value, error)
- func StyleRemove(ctx context.Context, args ...core.Value) (core.Value, error)
- func StyleSet(ctx context.Context, args ...core.Value) (core.Value, error)
- func ValidatePageRanges(pageRanges string) (bool, error)
- func WaitAttribute(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitAttributeAll(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitClass(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitClassAll(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitElement(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitNavigation(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitNoAttribute(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitNoAttributeAll(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitNoClass(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitNoClassAll(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitNoElement(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitNoStyle(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitNoStyleAll(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitStyle(ctx context.Context, args ...core.Value) (core.Value, error)
- func WaitStyleAll(ctx context.Context, args ...core.Value) (core.Value, error)
- func XPath(ctx context.Context, args ...core.Value) (core.Value, error)
- type PageLoadParams
- type Paging
- func (p *Paging) Compare(_ core.Value) int64
- func (p *Paging) Copy() core.Value
- func (p *Paging) Hash() uint64
- func (p *Paging) Iterate(_ context.Context) (core.Iterator, error)
- func (p *Paging) MarshalJSON() ([]byte, error)
- func (p *Paging) String() string
- func (p *Paging) Type() core.Type
- func (p *Paging) Unwrap() interface{}
- type PagingIterator
- type ParseParams
- type WaitNavigationParams
Constants ¶
This section is empty.
Variables ¶
var PagingType = core.NewType("paging")
Functions ¶
func AttributeGet ¶ added in v0.7.0
ATTR_GET gets single or more attribute(s) of a given element. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target node. @param {String, repeated} attrNames - Attribute name(s). @return {Object} - Key-value pairs of attribute values.
func AttributeRemove ¶ added in v0.7.0
ATTR_REMOVE removes single or more attribute(s) of a given element. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target node. @param {String, repeated} attrNames - Attribute name(s).
func AttributeSet ¶ added in v0.7.0
ATTR_SET sets or updates a single or more attribute(s) of a given element. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target node. @param {String | Object} nameOrObj - Attribute name or an object representing a key-value pair of attributes. @param {String} value - If a second parameter is a string value, this parameter represent an attribute value.
func Blur ¶ added in v0.9.0
BLUR Calls blur on the element. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target node. @param {String} [selector] - CSS selector.
func Click ¶
CLICK dispatches click event on a given element @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String | Int} [cssSelectorOrClicks] - CSS selector or count of clicks. @param {Int} [clicks=1] - Count of clicks.
func ClickAll ¶
CLICK_ALL dispatches click event on all matched element @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - CSS selector. @param {Int} [clicks=1] - Optional count of clicks. @return {Boolean} - True if matched at least one element.
func CookieDel ¶ added in v0.7.0
COOKIE_DEL gets a cookie from a given page by name. @param {HTMLPage} page - Target page. @param {HTTPCookie, repeated | String, repeated} cookiesOrNames - Cookie or cookie name to delete.
func CookieGet ¶ added in v0.7.0
COOKIE_GET gets a cookie from a given page by name. @param {HTMLPage} page - Target page. @param {String} name - Cookie or cookie name to delete. @return {HTTPCookie} - Cookie if found, otherwise None.
func CookieSet ¶ added in v0.7.0
COOKIE_SET sets cookies to a given page @param {HTMLPage} page - Target page. @param {HTTPCookie, repeated} cookies - Target cookies.
func Download ¶ added in v0.3.0
DOWNLOAD downloads a resource from the given GetURL. @param {String} url - URL to download. @return {Binary} - A base64 encoded string in binary format.
func Element ¶
ELEMENT finds an element by a given CSS selector. Returns NONE if element not found. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - CSS selector. @return {HTMLElement} - A matched HTML element
func ElementExists ¶ added in v0.6.0
ELEMENT_EXISTS returns a boolean value indicating whether there is an element matched by selector. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - CSS selector. @return {Boolean} - A boolean value indicating whether there is an element matched by selector.
func Elements ¶
ELEMENTS finds HTML elements by a given CSS selector. Returns an empty array if element not found. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - CSS selector. @return {HTMLElement[]} - An array of matched HTML elements.
func ElementsCount ¶
ELEMENTS_COUNT returns a number of found HTML elements by a given CSS selector. Returns an empty array if element not found. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - CSS selector. @return {Int} - A number of matched HTML elements by a given CSS selector.
func Focus ¶ added in v0.8.0
FOCUS Sets focus on the element. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} [selector] - CSS selector.
func Frames ¶ added in v0.12.0
FRAMES finds HTML frames by a given property selector. Returns an empty array if frames not found. @param {HTMLPage} page - HTML page. @param {String} property - Property selector. @param {Any} value - Property value. @return {HTMLDocument[]} - Returns an array of found HTML frames.
func GetInnerHTML ¶ added in v0.8.0
INNER_HTML returns inner HTML string of a given or matched by CSS selector element @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} [selector] - String of CSS selector. @return {String} - Inner HTML string if a matched element, otherwise empty string.
func GetInnerHTMLAll ¶ added in v0.8.0
INNER_HTML_ALL returns an array of inner HTML strings of matched elements. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - String of CSS selector. @return {String[]} - An array of inner HTML strings if all matched elements, otherwise empty array.
func GetInnerText ¶ added in v0.8.0
INNER_TEXT returns inner text string of a given or matched by CSS selector element @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} [selector] - String of CSS selector. @return {String} - Inner text if a matched element, otherwise empty string.
func GetInnerTextAll ¶ added in v0.8.0
INNER_TEXT_ALL returns an array of inner text of matched elements. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - String of CSS selector. @return {String[]} - An array of inner text if all matched elements, otherwise empty array.
func Hover ¶ added in v0.5.0
HOVER fetches an element with selector, scrolls it into view if needed, and then uses page.mouse to hover over the center of the element. If there's no element matching selector, the method returns an error. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} [selector] - If document is passed, this param must represent an element selector.
func Input ¶
INPUT types a value to an underlying input element. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} valueOrSelector - CSS selector or a value. @param {String} value - Target value. @param {Int} [delay] - Target value. @return {Boolean} - Returns true if an element was found.
func InputClear ¶ added in v0.9.0
INPUT_CLEAR clears a value from an underlying input element. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} [selector] - CSS selector.
func MouseMoveXY ¶ added in v0.7.0
MOUSE moves mouse by given coordinates. @param {HTMLDocument} document - HTML document. @param {Int|Float} x - X coordinate. @param {Int|Float} y - Y coordinate.
func Navigate ¶
NAVIGATE navigates a given page to a new resource. The operation blocks the execution until the page gets loaded. Which means there is no need in WAIT_NAVIGATION function. @param {HTMLPage} page - Target page. @param {String} url - Target url to navigate. @param {Int} [timeout=5000] - Navigation timeout.
func NavigateBack ¶
NAVIGATE_BACK navigates a given page back within its navigation history. The operation blocks the execution until the page gets loaded. If the history is empty, the function returns FALSE. @param {HTMLPage} page - Target page. @param {Int} [entry=1] - An integer value indicating how many pages to skip. @param {Int} [timeout=5000] - Navigation timeout. @return {Boolean} - True if history exists and the operation succeeded, otherwise false.
func NavigateForward ¶
NAVIGATE_FORWARD navigates a given page forward within its navigation history. The operation blocks the execution until the page gets loaded. If the history is empty, the function returns FALSE. @param {HTMLPage} page - Target page. @param {Int} [entry=1] - An integer value indicating how many pages to skip. @param {Int} [timeout=5000] - Navigation timeout. @return {Boolean} - True if history exists and the operation succeeded, otherwise false.
func Open ¶ added in v0.8.0
DOCUMENT opens an HTML page by a given url. By default, loads a page by http call - resulted page does not support any interactions. @param {Object} [params] - An object containing the following properties : @param {String} [params.driver] - Driver name to use. @param {Int} [params.timeout=60000] - Page load timeout. @param {String} [params.userAgent] - Custom user agent. @param {Boolean} [params.keepCookies=False] - Boolean value indicating whether to use cookies from previous sessions i.e. not to open a page in the Incognito mode. @param {HTTPCookies} [params.cookies] - Set of HTTP cookies to use during page loading. @param {HTTPHeaders} [params.headers] - Set of HTTP headers to use during page loading. @param {Object} [params.viewport] - Viewport params. @param {Int} [params.viewport.height] - Viewport height. @param {Int} [params.viewport.width] - Viewport width. @param {Float} [params.viewport.scaleFactor] - Viewport scale factor. @param {Boolean} [params.viewport.mobile] - Value that indicates whether to emulate mobile device. @param {Boolean} [params.viewport.landscape] - Value that indicates whether to render a page in landscape position. @return {HTMLPage} - Loaded HTML page.
func OpenOrCastPage ¶ added in v0.8.0
func PDF ¶
PDF prints a PDF of the current page. @param {HTMLPage | String}target - Target page or url. @param {Object} [params] - An object containing the following properties: @param {Bool} [params.landscape=False] - Paper orientation. @param {Bool} [params.displayHeaderFooter=False] - Display header and footer. @param {Bool} [params.printBackground=False] - Print background graphics. @param {Float} [params.scale=1] - Scale of the webpage rendering. @param {Float} [params.paperWidth=22] - Paper width in inches. @param {Float} [params.paperHeight=28] - Paper height in inches. @param {Float} [params.marginTo=1] - Top margin in inches. @param {Float} [params.marginBottom=1] - Bottom margin in inches. @param {Float} [params.marginLeft=1] - Left margin in inches. @param {Float} [params.marginRight=1] - Right margin in inches. @param {String} [params.pageRanges] - Paper ranges to print, e.g., '1-5, 8, 11-13'. @param {Bool} [params.ignoreInvalidPageRanges=False] - to silently ignore invalid but successfully parsed page ranges, such as '3-2'. @param {String} [params.headerTemplate] - HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - `date`: formatted print date - `title`: document title - `url`: document location - `pageNumber`: current page number - `totalPages`: total pages in the document For example, `<span class=title></span>` would generate span containing the title. @param {String} [params.footerTemplate] - HTML template for the print footer. Should use the same format as the `headerTemplate`. @param {Bool} [params.preferCSSPageSize=False] - Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size. * @return {Binary} - PDF document in binary format.
func Pagination ¶ added in v0.5.0
PAGINATION creates an iterator that goes through pages using CSS selector. The iterator starts from the current page i.e. it does not change the page on 1st iteration. That allows you to keep scraping logic inside FOR loop. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - CSS selector for a pagination on the page.
func Parse ¶ added in v0.6.0
PARSE loads an HTML page from a given string or byte array @param {String} html - HTML string to parse. @param {Object} [params] - An object containing the following properties: @param {String} [params.driver] - Name of a driver to parse with. @param {Boolean} [params.keepCookies=False] - Boolean value indicating whether to use cookies from previous sessions i.e. not to open a page in the Incognito mode. @param {HTTPCookies} [params.cookies] - Set of HTTP cookies to use during page loading. @param {HTTPHeaders} [params.headers] - Set of HTTP headers to use during page loading. @param {Object} [params.viewport] - Viewport params. @param {Int} [params.viewport.height] - Viewport height. @param {Int} [params.viewport.width] - Viewport width. @param {Float} [params.viewport.scaleFactor] - Viewport scale factor. @param {Boolean} [params.viewport.mobile] - Value that indicates whether to emulate mobile device. @param {Boolean} [params.viewport.landscape] - Value that indicates whether to render a page in landscape position. @return {HTMLPage} - Returns parsed and loaded HTML page.
func RegisterLib ¶ added in v0.8.0
func Screenshot ¶
SCREENSHOT takes a screenshot of a given page. @param {HTMLPage|String} target - Target page or url. @param {Object} [params] - An object containing the following properties : @param {Float | Int} [params.x=0] - X position of the viewport. @param {Float | Int} [params.y=0] - Y position of the viewport. @param {Float | Int} [params.width] - Width of the viewport. @param {Float | Int} [params.height] - Height of the viewport. @param {String} [params.format="jpeg"] - Either "jpeg" or "png". @param {Int} [params.quality=100] - Quality, in [0, 100], only for jpeg format. @return {Binary} - Screenshot in binary format.
func ScrollBottom ¶ added in v0.5.0
SCROLL_BOTTOM scrolls the document's window to its bottom. @param {HTMLDocument} document - HTML document. @param {Int | Float} x - X coordinate. @param {Int | Float} y - Y coordinate. @param {Object} [params] - Scroll params. @param {String} [params.behavior="instant"] - Scroll behavior @param {String} [params.block="center"] - Scroll vertical alignment. @param {String} [params.inline="center"] - Scroll horizontal alignment.
func ScrollInto ¶ added in v0.5.0
SCROLL_ELEMENT scrolls an element on. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - If document is passed, this param must represent an element selector. @param {Object} [params] - Scroll params. @param {String} [params.behavior="instant"] - Scroll behavior @param {String} [params.block="center"] - Scroll vertical alignment. @param {String} [params.inline="center"] - Scroll horizontal alignment.
func ScrollTop ¶ added in v0.5.0
SCROLL_TOP scrolls the document's window to its top. @param {HTMLDocument} document - HTML document. @param {Int | Float} x - X coordinate. @param {Int | Float} y - Y coordinate. @param {Object} [params] - Scroll params. @param {String} [params.behavior="instant"] - Scroll behavior @param {String} [params.block="center"] - Scroll vertical alignment. @param {String} [params.inline="center"] - Scroll horizontal alignment.
func ScrollXY ¶ added in v0.7.0
SCROLL scrolls by given coordinates. @param {HTMLDocument} document - HTML document. @param {Int | Float} x - X coordinate. @param {Int | Float} y - Y coordinate. @param {Object} [params] - Scroll params. @param {String} [params.behavior="instant"] - Scroll behavior @param {String} [params.block="center"] - Scroll vertical alignment. @param {String} [params.inline="center"] - Scroll horizontal alignment.
func Select ¶ added in v0.5.0
SELECT selects a value from an underlying select element. @param {HTMLElement} element - Target html element. @param {String | String[]} valueOrSelector - Selector or a an array of strings as a value. @param {String[]} value - Target value. Optional. @return {String[]} - Array of selected values.
func SetInnerHTML ¶ added in v0.8.0
INNER_HTML_SET sets inner HTML string to a given or matched by CSS selector element @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} htmlOrSelector - HTML or CSS selector. @param {String} html - String of inner HTML.
func SetInnerText ¶ added in v0.8.0
INNER_TEXT_SET sets inner text string to a given or matched by CSS selector element @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} textOrCssSelector - String of CSS selector. @param {String} [text] - String of inner text.
func StyleGet ¶ added in v0.7.0
STYLE_GET gets single or more style attribute value(s) of a given element. @param {HTMLElement} element - Target html element. @param {String, repeated} names - Style name(s). @return {Object} - Collection of key-value pairs of style values.
func StyleRemove ¶ added in v0.7.0
STYLE_REMOVE removes single or more style attribute value(s) of a given element. @param {HTMLElement} element - Target html element. @param {String, repeated} names - Style name(s).
func StyleSet ¶ added in v0.7.0
STYLE_SET sets or updates a single or more style attribute value of a given element. @param {HTMLElement} element - Target html element. @param {String | Object} nameOrObj - Style name or an object representing a key-value pair of attributes. @param {String} value - If a second parameter is a string value, this parameter represent a style value.
func ValidatePageRanges ¶
func WaitAttribute ¶ added in v0.7.0
WAIT_ATTR waits until a target attribute's value appears @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} attrNameOrSelector - String of an attr name or CSS selector. @param {String | Any} attrValueOrAttrName - Attr value or name. @param {Any | Int} [attrValueOrTimeout] - Attr value or a timeout. @param {Int} [timeout=5000] - Wait timeout.
func WaitAttributeAll ¶ added in v0.7.0
WAIT_ATTR_ALL waits for an attribute to appear on all matched elements with a given value. Stops the execution until the navigation ends or operation times out. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - String of CSS selector. @param {String} class - String of target CSS class. @param {Int} [timeout=5000] - Wait timeout.
func WaitClass ¶
WAIT_CLASS waits for a class to appear on a given element. Stops the execution until the navigation ends or operation times out. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selectorOrClass - If document is passed, this param must represent an element selector. Otherwise target class. @param {String | Int} [classOrTimeout] - If document is passed, this param must represent target class name. Otherwise timeout. @param {Int} [timeout] - If document is passed, this param must represent timeout. Otherwise not passed.
func WaitClassAll ¶
WAIT_CLASS_ALL waits for a class to appear on all matched elements. Stops the execution until the navigation ends or operation times out. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - String of CSS selector. @param {String} class - String of target CSS class. @param {Int} [timeout=5000] - Wait timeout.
func WaitElement ¶
WAIT_ELEMENT waits for element to appear in the DOM. Stops the execution until it finds an element or operation times out. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - Target element's selector. @param {Int} [timeout=5000] - Wait timeout.
func WaitNavigation ¶
WAIT_NAVIGATION waits for a given page to navigate to a new url. Stops the execution until the navigation ends or operation times out. @param {HTMLPage} page - Target page. @param {Int} [timeout=5000] - Navigation timeout. @param {Object} [params=None] - Navigation parameters. @param {Int} [params.timeout=5000] - Navigation timeout. @param {String} [params.target] - Navigation target url. @param {HTMLDocument} [params.frame] - Navigation frame.
func WaitNoAttribute ¶ added in v0.7.0
WAIT_NO_ATTR waits until a target attribute's value disappears @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} attrNameOrSelector - String of an attr name or CSS selector. @param {String | Any} attrValueOrAttrName - Attr value or name. @param {Any | Int} [attrValueOrTimeout] - Attr value or wait timeout. @param {Int} [timeout=5000] - Wait timeout.
func WaitNoAttributeAll ¶ added in v0.7.0
WAIT_NO_ATTR_ALL waits for an attribute to disappear on all matched elements by a given value. Stops the execution until the navigation ends or operation times out. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - String of CSS selector. @param {String} class - String of target CSS class. @param {Int} [timeout=5000] - Wait timeout.
func WaitNoClass ¶ added in v0.7.0
WAIT_NO_CLASS waits for a class to disappear on a given element. Stops the execution until the navigation ends or operation times out. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selectorOrClass - If document is passed, this param must represent an element selector. Otherwise target class. @param {String | Int} [classOrTimeout] - If document is passed, this param must represent target class name. Otherwise timeout. @param {Int} [timeout] - If document is passed, this param must represent timeout. Otherwise not passed.
func WaitNoClassAll ¶ added in v0.7.0
WAIT_NO_CLASS_ALL waits for a class to disappear on all matched elements. Stops the execution until the navigation ends or operation times out. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - String of CSS selector. @param {String} class - String of target CSS class. @param {Int} [timeout=5000] - Wait timeout.
func WaitNoElement ¶ added in v0.7.0
WAIT_NO_ELEMENT waits for element to disappear in the DOM. Stops the execution until it does not find an element or operation times out. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} selector - Target element's selector. @param {Int} [timeout=5000] - Wait timeout.
func WaitNoStyle ¶ added in v0.7.0
WAIT_NO_STYLE waits until a target style value disappears @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} styleNameOrSelector - Style name or CSS selector. @param {String | Any} valueOrStyleName - Style value or name. @param {Any | Int} [valueOrTimeout] - Style value or wait timeout. @param {Int} [timeout=5000] - Wait timeout.
func WaitNoStyleAll ¶ added in v0.7.0
WAIT_NO_STYLE_ALL waits until a target style value disappears on all matched elements with a given value. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} styleNameOrSelector - Style name or CSS selector. @param {String | Any} valueOrStyleName - Style value or name. @param {Any | Int} [valueOrTimeout] - Style value or wait timeout. @param {Int} [timeout=5000] - Timeout.
func WaitStyle ¶ added in v0.7.0
WAIT_STYLE waits until a target style value appears @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} styleNameOrSelector - Style name or CSS selector. @param {String | Any} valueOrStyleName - Style value or name. @param {Any | Int} [valueOrTimeout] - Style value or wait timeout. @param {Int} [timeout=5000] - Wait timeout.
func WaitStyleAll ¶ added in v0.7.0
WAIT_STYLE_ALL waits until a target style value appears on all matched elements with a given value. @param {HTMLPage | HTMLDocument | HTMLElement} node - Target html node. @param {String} styleNameOrSelector - Style name or CSS selector. @param {String | Any} valueOrStyleName - Style value or name. @param {Any | Int} [valueOrTimeout] - Style value or wait timeout. @param {Int} [timeout=5000] - Timeout.
Types ¶
type PageLoadParams ¶ added in v0.8.0
type Paging ¶ added in v0.5.0
type Paging struct {
// contains filtered or unexported fields
}
func (*Paging) MarshalJSON ¶ added in v0.5.0
type PagingIterator ¶ added in v0.5.0
type PagingIterator struct {
// contains filtered or unexported fields
}
type ParseParams ¶ added in v0.10.0
type ParseParams struct { drivers.ParseParams Driver string }
type WaitNavigationParams ¶ added in v0.10.0
type WaitNavigationParams struct {}
Source Files ¶
- attr_get.go
- attr_remove.go
- attr_set.go
- blur.go
- clear.go
- click.go
- click_all.go
- cookie_del.go
- cookie_get.go
- cookie_set.go
- document.go
- download.go
- element.go
- element_exists.go
- elements.go
- elements_count.go
- find_frames.go
- focus.go
- get_inner_html.go
- get_inner_html_all.go
- get_inner_text.go
- get_inner_text_all.go
- hover.go
- input.go
- lib.go
- mouse_xy.go
- navigate.go
- navigate_back.go
- navigate_forward.go
- pagination.go
- parse.go
- pdf.go
- screenshot.go
- scroll_bottom.go
- scroll_element.go
- scroll_top.go
- scroll_xy.go
- select.go
- set_inner_html.go
- set_inner_text.go
- style_get.go
- style_remove.go
- style_set.go
- wait_attr.go
- wait_attr_all.go
- wait_class.go
- wait_class_all.go
- wait_element.go
- wait_navigation.go
- wait_style.go
- wait_style_all.go
- xpath.go