def text
      assert_exists

      tn = @element.node_name.downcase

      case tn
      when 'input'
        @element.get_attribute(:value)
      when 'button'
        @element.text
      else
        raise Exception::Error, "unknown tag name for button: #{tn}"
      end
    end
def text
      assert_exists

      tn = @element.node_name.downcase

      case tn
      when 'input'
        @element.get_attribute(:value)
      when 'button'
        @element.text
      else
        raise Exception::Error, "unknown tag name for button: #{tn}"
      end
    end
Returns the text of the button.

 For input elements, returns the "value" attribute.
 For button elements, returns the inner text.

 @return [String]