Returns text from an element. For inputs use getValue instead.
getValue
const title = await getText(ctx, 'h1[id="title"]'); Copy
const title = await getText(ctx, 'h1[id="title"]');
Context object.
The element selector for which to return text.
Optional
Element text content as a string.
Returns text from an element. For inputs use
getValue
instead.Example