title: can´t select dropdown option (selenide/java)
body: <p>I have a little problem selecting options out of drop down lists with selenide (java).</p>
  
  <p>Here's a little snippet of the HTML code and my try to select the option by the value:</p>
  
  <p><a href="https://i.stack.imgur.com/4ELYa.png" rel="nofollow noreferrer">HTML snippet</a></p>
  
  <p>[Java code]</p>
  
  <pre><code>    String dateRangeSearchFor = "YESTERDAY";
      ElementsCollection ListOfOptions = $(By.id("searchMaskForm:jobSearch_dateRange_input")).$$(By.tagName("option"));
      logger.info("selecting option");
      for (SelenideElement listElement : ListOfOptions)
      {
          String valueOfElement = listElement.getAttribute("value");
          if (valueOfElement.equals(dateRangeSearchFor))
          {
              //$(By.xpath("//*[@id='searchMaskForm:jobSearch_dateRange_input']/option[contains(., '"+dateRangeSearchFor+"')]")).setSelected(true);
  
              listElement.setSelected(true); break;
  
          }
      }
  </code></pre>
  
  <p>For some reason the code is not working, neither with the text nor with the index. Any suggestions?</p>
  
  <p>Edit: <code>.click();</code> and <code>selectOption();</code> aren't working neither</p>