public function waitUntilElementIsVisible(string $cssSelector, int $timeout = 5, TraversableElement $baseElement = null): void
    {
        $baseElement = $baseElement ?? $this->getSession()->getPage();

        try {
            $this->waitUntil($timeout, function () use ($cssSelector, $baseElement) {
                $element = $baseElement->find('css', $cssSelector);

                return isset($element) && $element->isVisible();
            });
        } catch (Exception $e) {
            throw new ElementNotVisible(sprintf('Element with selector: %s was not found', $cssSelector));
        }
    }