def wait_until(timeout = 30, &block)
      returned = nil

      Timeout.timeout(timeout) do
        until returned = yield(self)
          refresh_page_from_window
          sleep 0.1
        end
      end

      returned
    end
def wait_until(timeout = 30, &block)
      returned = nil

      Timeout.timeout(timeout) do
        until returned = yield(self)
          refresh_page_from_window
          sleep 0.1
        end
      end

      returned
    end
Wait until the given block evaluates to true (Celerity only)

 @param [Fixnum] timeout Number of seconds to wait before timing out (default: 30).
 @yieldparam [Celerity::Browser] browser The browser instance.
 @see Celerity::Browser#resynchronized