Matterway
    Preparing search index...

    Interface GetValueOptions

    Returns the value of a form element.

    const firstName = await getValue(ctx, 'input[name="firstName"]');
    

    Context object.

    The element selector for which to return value.

    Options for waiting and querying. Supports root to specify a root element.

    The value of the form element as a string.

    interface GetValueOptions {
        visible?: boolean;
        hidden?: boolean;
        timeout?: number;
        signal?: AbortSignal;
    }

    Hierarchy (View Summary)

    Index

    Properties

    visible?: boolean

    Wait for the selected element to be present in DOM and to be visible. See ElementHandle.isVisible for the definition of element visibility.

    false

    hidden?: boolean

    Wait for the selected element to not be found in the DOM or to be hidden. See ElementHandle.isHidden for the definition of element invisibility.

    false

    timeout?: number

    Maximum time to wait in milliseconds. Pass 0 to disable timeout.

    The default value can be changed by using Page.setDefaultTimeout

    30_000 (30 seconds)

    signal?: AbortSignal

    A signal object that allows you to cancel a waitForSelector call.