code: public String getText() {
          String text = getElement().getText();
          if (text.isEmpty()) {
              text = getValue();
          }
          return text;
      }
docs: Get the text value from a TextField object.
  
  @return text is the text in the TextField box.