element.isVisible
element.isVisible(): Promise<boolean>
Section titled “element.isVisible(): Promise<boolean>”Checks if the element is visible. An element is considered visible if:
-
Its
displayproperty is not set tonone. -
Its
visibilityproperty is not set tohidden. -
Its
opacityproperty is not set to0. -
It is not off-screen.
-
It has a positive width and height.
-
Returns a promise that resolves to
trueif the element is visible,falseotherwise.
describe('Test script', function () { it('Test 1', async () => { const element = await gf.get('.my-element'); const isVisible = await element.isVisible(); });});