Skip to main content

Verification & Web Scraping Actions

Web Automation includes two families of actions that go beyond clicking and typing:

  • Verification actions assert that a page is in the expected state — data values, list ordering, media loading, layout, and link health.
  • Web scraping actions extract data from pages — repeated rows, structured metadata, network responses, and multi-page crawls — into the execution output.

Add these actions to a script the same way as any other action, from the script editor.

How verification results are handled​

Verification actions distinguish between an assertion result and an execution error:

  • A failed assertion (for example, a list is out of order or a link returns a 404) is recorded in the execution report but does not halt the run. Later actions still execute.
  • An action that cannot run at all (for example, a required selector matches nothing) throws an error and stops the run, like any other failing action.

Each verification action contributes a failures-first entry to the execution report, merged into the execution's customOutput. A report entry has the shape:

{
"url": "https://app.example.com/products",
"data": {
"header": "verifyorder",
"pageUrl": "https://app.example.com/products",
"comments": "List is not sorted ascending (2 violations)"
}
}

Verification Actions​

verifydata​

Extract one or more field values, then assert them against a JavaScript boolean expression.

Parameters

ParameterTypeRequiredDefaultDescription
fieldsmap (string → string)Yes--Field name to element selector. Each entry captures the text of the matched element.
assertstringYes--JavaScript boolean expression evaluated against the captured fields.

Output: fields (captured values), assertExpression, assertionPassed.

verifyorder​

Verify that a list of elements is sorted.

Parameters

ParameterTypeRequiredDefaultDescription
selectorstringYes--Selector matching the list items to check.
orderstringYesascExpected order: asc or desc.

Output: order, totalItems, isCorrectOrder, values, violations[] (each { index, previousValue, currentValue }).

verifymedia​

Verify that images and videos in a page region loaded without breaking.

Parameters

ParameterTypeRequiredDefaultDescription
minCountnumberNo1Minimum number of media items expected.
scopestringNo""Selector limiting the region to check. Empty checks the whole page.
errorSelectorstringNo""Selector whose presence marks a media error.
revealobjectNo--Optional strategy to reveal lazy-loaded media before checking.
reveal.clickEachbooleanNo--Click each candidate to reveal media.
reveal.clickNextbooleanNo--Click a "next" control to page through media.
reveal.maxClicksnumberNo10Maximum reveal clicks.
reveal.waitMsnumberNo800Wait after each reveal click, in milliseconds.
reveal.scrollToBottombooleanNofalseScroll to the bottom to trigger lazy loading.

Output: scope, scopeFound, images and videos (each { total, loaded, broken, details[] }), totalMedia, totalLoaded, allLoaded.

verifylayout​

Detect overlapping or overflowing elements in a page region.

Parameters

ParameterTypeRequiredDefaultDescription
scopestringNo""Selector limiting the region to check. Empty checks the whole page.
checkOverlapbooleanNotrueCheck for overlapping elements.
checkOverflowbooleanNotrueCheck for elements overflowing their container.
overlapThresholdnumberNo0.25Fraction of area overlap that counts as an issue.
minSizenumberNo8Minimum element size, in pixels, to consider.
failOnIssuesbooleanNofalseRecord a failed assertion when issues are found.

Output: scope, scopeFound, overlapIssues[], overflowIssues[], hasIssues.

Crawl links in a region and check their HTTP status.

Parameters

ParameterTypeRequiredDefaultDescription
scopestringNo""Selector limiting the region to check. Empty checks the whole page.
linkTypestringNoallWhich links to check: all, internal, or external.
checkHttpStatusbooleanNotrueRequest each link and record its HTTP status.
maxLinksnumberNo50Maximum number of links to check.

Output: location, scopeFound, total, valid, redirects, broken, errors, details[] (each { url, text, status, category }).

sortandverify​

Apply a UI sort control, then verify the resulting order.

Parameters

ParameterTypeRequiredDefaultDescription
openstringNo--Selector for a control that opens the sort menu, if required.
controlobjectYes--The sort control to operate.
control.typestringNomenuControl type: select or menu.
control.selectorstringYes--Selector for the sort control.
control.optionSelectorstringNo--Selector for the option within the control.
waitAfterobjectNo--How to wait after applying the sort.
waitAfter.strategystringNodomstableWait strategy: domstable or networkidle.
waitAfter.timeoutnumberNo10Wait timeout, in seconds.
failOnViolationbooleanNotrueRecord a failed assertion when the order is wrong.
optionsarray of objectsYes--Sort rules to apply and verify.
options[].matchstringYes--Option label or value to select.
options[].verifybooleanNotrueVerify the order after applying this option.
options[].fieldstringNo--Field whose values are compared.
options[].typestringNonumericComparison type: numeric or alpha.
options[].orderstringNoascExpected order: asc or desc.

Output: selectedOption, matchedRule, field, type, order, totalItems, isCorrectOrder, values, violations[].

Web Scraping Actions​

Scraping actions write their JSON result to the execution's customOutput, keyed by the action's capture-variable name. The result is then available in the execution report and result and can be consumed by later actions.

extractpagedata​

Extract repeated rows from a list or table.

Parameters

ParameterTypeRequiredDefaultDescription
selectorstringYes--Selector matching each row.
fieldsmap (string → string)Yes--Field name to a sub-selector relative to the row.
limitnumberNo50Maximum number of rows to extract.

Output: a JSON array of row objects, one per matched row.

extractstructureddata​

Extract JSON-LD / schema.org structured metadata embedded in the page.

Parameters

ParameterTypeRequiredDefaultDescription
typesarray of stringsNo[]Schema types to keep. Empty returns all found.

Output: a JSON array of the matching structured-data objects.

capturenetwork​

Capture the response body of a matching network request.

Parameters

ParameterTypeRequiredDefaultDescription
patternstringYes--Substring matched against request URLs.
methodstringNo""HTTP method to match: "" (any), GET, POST, PUT, PATCH, or DELETE.
timeoutnumberNo10How long to wait for a match, in seconds.

Output: the captured response body.

crawl​

Follow links matching a pattern and extract fields from each page.

Parameters

ParameterTypeRequiredDefaultDescription
linkPatternstringYes--Pattern matched against link URLs to follow.
maxPagesnumberNo10Maximum number of pages to crawl.
extractFieldsmap (string → string)Yes--Field name to selector, extracted on each page.
waitStrategystringNodomstableWait strategy per page: domstable, networkidle, or load.
paginationSelectorstringNo--Selector for a next-page control, if paginating.

Output: a JSON array with one object per crawled page; each object includes a _url field.

sparoute​

Navigate to a client-side route in a single-page application without a full page reload.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes--Client-side route path to navigate to.
waitStrategystringNodomstableWait strategy after navigation.
timeoutnumberNo10Wait timeout, in seconds.

randomselect​

Pick a random element matching a selector — useful for exercising varied paths.

Parameters

ParameterTypeRequiredDefaultDescription
selectorstringYes--Selector matching the candidate elements.

Output: totalElements, selectedIndex, selectedText, selectedHref.

Next Steps​