element.isFocused
element.isFocused(): Promise<boolean>
Section titled “element.isFocused(): Promise<boolean>”Checks if the element is focused.
- Returns a promise that resolves to
true
if the element is focused, otherwisefalse
.
describe('Test script', function () { it('Test 1', async () => { const element = await gf.get('.my-element'); assert.equal(await element.isFocused(), true); });});