Skip to content

gf.text

gf.text(selector: string): Promise<string>

Section titled “gf.text(selector: string): Promise<string>”

Retrieves the text content of the specified element.

  • selector: The CSS selector of the element to retrieve.
  • Returns a promise that resolves to the text content of the element.
describe('Test script', function () {
it('Test 1', async () => {
const text = await gf.text('.my-element');
});
});