public static function invisibilityOfElementWithText(WebDriverBy $by, $text)
    {
        return new static(
            function (WebDriver $driver) use ($by, $text) {
                try {
                    return !($driver->findElement($by)->getText() === $text);
                } catch (NoSuchElementException $e) {
                    return true;
                } catch (StaleElementReferenceException $e) {
                    return true;
                }
            }
        );
    }