Returns an element based on its text content.
Context object.
Text to search for.
Optional
Options for filtering.
The selected element as an element handle.
const $el = await getElementByText(ctx, 'Save and Submit'); Copy
const $el = await getElementByText(ctx, 'Save and Submit');
const $el = await getElementByText(ctx, 'Last Name', {filterElementWithTag: 'div'}); Copy
const $el = await getElementByText(ctx, 'Last Name', {filterElementWithTag: 'div'});
Returns an element based on its text content.