Docs
API 1.39
Status
DSL

Conditions

Every kind of condition, for landmarks, expectations and control flow.

A condition is an object with exactly one of these keys. Conditions are written in landmarks, a step's expect and if, when, loop_until, wait_for, scroll.until and paginate.stop_when; all, any and not combine them.

ConditionTypeDescription
urlstring or objectTrue when the page URL matches a glob (* within a path segment, ** across segments, ? one character), or a regular expression given as { "matches": … }.
titleobjectTrue when the page title matches; give exactly one of contains, equals or matches.
visibletargetTrue when the target exists and is visible.
hiddentargetTrue when the target is not visible, including when it does not exist.
existstargetTrue when the target is in the page, visible or not.
absenttargetTrue when the target is not in the page.
textobjectTrue when the target's text matches; give target and exactly one of contains, equals or matches.
countobjectTrue when the number of elements matching target satisfies the bounds; give at least one of min, max and eq.
networkobjectTrue when a response matching url, and method and status if given, has been observed since the step started.
varobjectCompares a value from inputs, vars, session or job with op and value.
landmarkstringTrue when the named entry of the program's landmarks holds.
allcondition[]True when every condition in the list holds.
anycondition[]True when at least one condition in the list holds.
notconditionTrue when the given condition does not hold.

Was this page helpful?