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
display
property is not set tonone
. -
Its
visibility
property is not set tohidden
. -
Its
opacity
property is not set to0
. -
It is not off-screen.
-
It has a positive width and height.
-
Returns a promise that resolves to
true
if the element is visible,false
otherwise.
describe('Test script', function () { it('Test 1', async () => { const element = await gf.get('.my-element'); const isVisible = await element.isVisible(); });});