public function waitForSelectorVisibility($cssSelector, $attempts = 10, $waitInterval = 1)
    {
        $this->waitFor(function ($context) use ($cssSelector) {
            /** @var Web $context */
            try {
                $context->assertIsVisible($cssSelector);
            } catch (ExpectationException $e) {
                return false;
            }

            return true;
        }, $attempts, $waitInterval);
    }