public function wait($timeout = 30)
    {
        $lastException = null;
        for ($i = 0; $i < $timeout; $i++) {
            try {
                $this->text();
                return $this;
            } catch (WebDriver_Exception $e) {
                $lastException = $e;
                sleep(1);
            }
        }

        if (null !== $lastException) {
            throw $lastException;
        }

        return $this;
    }