public function isElementVisible(string $locator, int $timeout = 5): bool
    {
        try {
            $element = $this->findElement($locator, $timeout);

            return isset($element) && $element->isVisible();
        } catch (ElementNotFoundException $e) {
            return false;
        }
    }
public function isElementVisible(string $locator, int $timeout = 5): bool
    {
        try {
            $element = $this->findElement($locator, $timeout);

            return isset($element) && $element->isVisible();
        } catch (ElementNotFoundException $e) {
            return false;
        }
    }
public function isElementVisible ( string $ locator , int $ timeout = 5 ) : bool { try { $ element = $ this -> findElement ( $ locator , $ timeout ) ; return isset ( $ element ) && $ element -> isVisible ( ) ; } catch ( ElementNotFoundException $ e ) { return false ; } }
Checks the visibility of a HTML element found by class.

@param string $locator CSS locator of the element
@param int $timeout Number of seconds to wait until the element appears

@return bool
Checks the visibility of a HTML element found by class .