Matterway
    Preparing search index...

    Variable getTextConst

    getText: (
        ctx: Context,
        selector: string,
        options?: GetValueOptions,
    ) => Promise<string | null> = getValue

    Returns text from an element. For inputs use getValue instead.

    Type Declaration

      • (
            ctx: Context,
            selector: string,
            options?: GetValueOptions,
        ): Promise<string | null>
      • Parameters

        • ctx: Context

          Context object.

        • selector: string

          The element selector for which to return text.

        • Optionaloptions: GetValueOptions

        Returns Promise<string | null>

        Element text content as a string.

    const title = await getText(ctx, 'h1[id="title"]');