Circus
    Preparing search index...

    Represents a circus driver that wraps an html element.

    Implements

    Index

    Constructors

    Properties

    element: HTMLElement

    The element to wrap.

    Methods

    • Returns an attribute of the driver.

      Type Parameters

      • T extends string

      Parameters

      • attribute: string

        The attribute to retrieve.

      • fallback: T | null = null

      Returns Promise<T | null>

      The attribute value, or null if no such value exists.

    • Returns a list of classes on the driver context that match a given filter.

      Parameters

      • Optionalfilter: string[]

        The filter of classes you want to check for. If you just want to get all classes, then just use undefined here.

      Returns Promise<string[]>

      The list of classes that match the filter.

    • Destroys the session.

      This releases all memory and items used by this object. If nothing is used, then this may do nothing.

      Returns Promise<void>

    • Gets whether the context described by this driver is disabled.

      Returns Promise<boolean>

      True if the driver context is disabled. False if enabled.

    • Looks at the app structure to see if a css selector will produce any results.

      Parameters

      • selector: string

        The selector to check.

      Returns Promise<boolean>

      True if the selector will result in one or more results. False otherwise.

    • Selects all items under this driver that matches the css selector.

      Parameters

      • selector: string

        The selector to query.

      Returns Promise<IZCircusDriver[]>

      A promise that resolves with all items found from the selector. If no items are found, then an empty array is returned.

    • Selects a single item under the driver that matches the css selector.

      Parameters

      • selector: string

        The selector to query.

      Returns Promise<IZCircusDriver>

      A resolved promise with the first item found if the selector produces one or more results. Returns a rejected promise if the selector returns no items.

    • Gets whether the value of the driver context is selected.

      Returns Promise<boolean>

      True if the context is in a selected state. False otherwise.

    • Gets the underlying text of the driver context.

      Returns Promise<string>

      The underlying text of the driver context. Returns the empty string if no text exists.

    • Gets the underlying value of the driver context.

      Parameters

      • fallback: string

        The fallback value in the case that the driver does not support a value.

      Returns Promise<string>

      The underlying value of the driver context, or fallback if the driver does not support a value.

    • Gets the underlying value of the driver context if there is one.

      Returns Promise<string | null>

      The underlying value of the driver context if there is one. Returns null if the driver does not support a value.