Skip to content

Commit

Permalink
Added docs about statusCodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ziflex committed Mar 6, 2021
1 parent 3efc7de commit 2f5954e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions examples/history-api.fql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
LET page = DOCUMENT("https://soundcloud.com", { driver: "cdp"})
LET doc = page.mainFrame

WAIT_ELEMENT(doc, ".trendingTracks")
SCROLL_ELEMENT(doc, ".trendingTracks")
WAIT_ELEMENT(doc, ".trendingTracks .badgeList__item")

LET song = ELEMENT(doc, ".trendingTracks .badgeList__item")
CLICK(song)

WAIT_ELEMENT(doc, ".l-listen-hero")

RETURN {
page: page.url,
first: doc.url
}
3 changes: 3 additions & 0 deletions pkg/stdlib/html/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ type PageLoadParams struct {
// @param {Object[]} [params.ignore.resources] - Collection of rules to ignore resources during page load and navigation.
// @param {String} [params.ignore.resources.*.url] - Resource url pattern. If set, requests for matching urls will be blocked. Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to "*".
// @param {String} [params.ignore.resources.*.type] - Resource type. If set, requests for matching resource types will be blocked.
// @param {Object[]} [params.ignore.statusCodes] - Collection of rules to ignore certain HTTP codes that can cause failures.
// @param {String} [params.ignore.statusCodes.*.url] - Url pattern. If set, codes for matching urls will be ignored. Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to "*".
// @param {Int} [params.ignore.statusCodes.*.code] - HTTP code to ignore.
// @param {Object} [params.viewport] - Viewport params.
// @param {Int} [params.viewport.height] - Viewport height.
// @param {Int} [params.viewport.width] - Viewport width.
Expand Down

0 comments on commit 2f5954e

Please sign in to comment.