element.text
element.text(): Promise<string>
Section titled “element.text(): Promise<string>”Retrieves the text content of the element.
- Returns a promise that resolves to the text content of the element.
describe('Test script', function () { it('Test 1', async () => { const element = await gf.get('.my-element'); const text = await element.text(); });});