code: public String[] getContentValue() {
          List<WebElement> options = getElement().findElements(By.tagName("option"));
          List<String> contents = new ArrayList<String>();
  
          for (WebElement option : options) {
              contents.add(option.getAttribute("value"));
          }
  
          return (String[]) contents.toArray(new String[contents.size()]);
      }
docs: Get all values, whether they are selected or not.
  
  @return All values, selected or not.