gf.isVisible
gf.isVisible(selector: string): Promise<boolean>
Section titled “gf.isVisible(selector: string): Promise<boolean>”Checks if the specified element is visible.
selector
: The CSS selector of the element to check.- Returns a promise that resolves to
true
if the element is visible,false
otherwise. - 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.
- Its
describe('Test script', function () { it('Test 1', async () => { const isVisible = await gf.isVisible('.my-element'); });});