def exists(pre_check = 0, post_check = @core.default_wait)
      # do not uset set_wait here.
      # it will cause problems with other methods reading the default_wait of 0
      # which then gets converted to a 1 second wait.
      @driver.manage.timeouts.implicit_wait = pre_check
      # the element exists unless an error is raised.
      exists                                = true

      begin
        yield # search for element
      rescue StandardError
        exists = false # error means it's not there
      end

      # restore wait
      @driver.manage.timeouts.implicit_wait = post_check if post_check != pre_check

      exists
    end
def exists(pre_check = 0, post_check = @core.default_wait)
      # do not uset set_wait here.
      # it will cause problems with other methods reading the default_wait of 0
      # which then gets converted to a 1 second wait.
      @driver.manage.timeouts.implicit_wait = pre_check
      # the element exists unless an error is raised.
      exists                                = true

      begin
        yield # search for element
      rescue StandardError
        exists = false # error means it's not there
      end

      # restore wait
      @driver.manage.timeouts.implicit_wait = post_check if post_check != pre_check

      exists
    end
Returns existence of element.

 Example:

 exists { button('sign in') } ? puts('true') : puts('false')

 @param [Integer] pre_check The amount in seconds to set the
                             wait to before checking existence
 @param [Integer] post_check The amount in seconds to set the
                             wait to after checking existence
 @yield The block to call
 @return [Boolean]