docs: @Override
    public void selectByVisibleText(String text) {
      // try to find the option via XPATH ...
      List<WebElement> options =
        element.findElements(By.xpath(".//option[normalize-space(.) = " + Quotes.escape(text) + "]"));
  
      for (WebElement option : options) {
        setSelected(option, true);
        if (!isMultiple()) {
          return;
        }
      }
  
      boolean matched = !options.isEmpty();
      if (!matched && text.contains(" ")) {
        String subStringWithoutSpace = getLongestSubstringWithoutSpace(text);
        List<WebElement> candidates;
        if ("".equals(subStringWithoutSpace)) {
          // hmm, text is either empty or contains only spaces - get all options ...
          candidates = element.findElements(By.tagName("option"));
        } else {
          // get candidates via XPATH ...
          candidates =
            element.findElements(By.xpath(".//option[contains(., " +
                                          Quotes.escape(subStringWithoutSpace) + ")]"));
        }
        for (WebElement option : candidates) {
          if (text.equals(option.getText())) {
            setSelected(option, true);
            if (!isMultiple()) {
              return;
            }
            matched = true;
          }
        }
      }
  
      if (!matched) {
        throw new NoSuchElementException("Cannot locate option with text: " + text);
      }
    }