Skip to main content

sdk.watcher

Home > @matterway/sdk > Watcher

Watcher namespace

Classes

ClassDescription
WatcherWatches a matcher function, and trigger whenever it changes from matching to not.

Functions

FunctionDescription
randomWait(duration)Waits for a random amount of time.
wait(duration)Waits for a specified amount of time.
waitForAll(ctx, selectors, options)Waits for all selectors to become present.
waitForAny(ctx, selectors, options)Waits for any of the given selectors.
waitForFirstCondition(conditions)High level helper which runs enter/leave when selector is being matched.
waitForFirstWatch(ctx, matchers)Starts several watchers, and resolves with key of the first which matches.
waitForMutation(ctx, options)High level helper which is resolved on any DOM mutation.
waitForNavigation(ctx, options)High level helper which is resolved on navigation.
waitForPageChange(ctx, options)High level helper which is resolved either on page mutation or navigation.
waitForSelector(ctx, selector, options)Waits for a selector to become visible.
waitForText(ctx, label, element, options)Waits for text to appear in element.
waitForValue(ctx, selector, value, options)Watches for the value of a input element to match the value provided.
waitForValueChange(ctx, selector, waitOptions)Waits for the value to change for a given input fields.
waitForWatch(ctx, spec)Waits for a watcher to match, and resolves with the value.
watch(ctx, spec)Starts watching a matcher function, and trigger whenever it changes from matching to not.
watchOnce(ctx, spec)Watches a match function until it matches, then stops.
watchSelector(ctx, selector, options)Watches an element by CSS selector, and executes code when it appears or disappears.
watchXpath(ctx, selector, options)Watches an element by XPath selector, and executes code when it appears or disappears.
xpathLabel(label, element)

Interfaces

InterfaceDescription
Options
WaitForMutationOptions
WaitForNavigationOptions
waitForPageChangeOptions
WaitValueOptions
WatcherSpec

Variables

VariableDescription
DEFAULT_TIMEOUT
defaultWaitForMutationOptions
defaultWaitForNavigationOptions
defaultWaitForPageChangeOptions
defaultWatchSelectorOptions

Type Aliases

Type AliasDescription
Conditions
MaybeElementHandle
WaitForWatchSpec
WaitOptions
WatchSelectorOptions