Skip to content

element.focus

Focuses the DOM element.

  • Returns a promise that resolves when the element is focused.
describe('Test script', function () {
it('Test 1', async () => {
const element = await gf.get('.my-element');
await element.focus();
assert.equal(await element.isFocused(), true);
});
});