Matterway
    Preparing search index...

    Variable getTextConst

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

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

    Type Declaration

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

        • ctx: Context

          Context object.

        • selector: string

          The element selector for which to return text.

        • Optionaloptions: GetValueOptions

        Returns Promise<string>

        Element text content as a string.

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