title: How to get all the options from drop down using Selenium WebDriver java
body: <pre><code>&lt;select id="vehicleTypeName" class="custom-select" name="vehicleTypeName"&gt;
  &lt;option value=""&gt;-Select Style-&lt;/option&gt;
  &lt;option value="Hatchback"&gt;Hatchback Cars&lt;/option&gt;
  &lt;option value="Sedans"&gt;Sedan Cars&lt;/option&gt;
  &lt;option value="MUV"&gt;MPV Cars&lt;/option&gt;
  &lt;option value="Sport Utilities"&gt;SUV Cars&lt;/option&gt;
  &lt;option value="Luxury Vehicles"&gt;Luxury Cars&lt;/option&gt;
  &lt;option value="Hybrids"&gt;Hybrid Cars&lt;/option&gt;
  &lt;option value="Minivans"&gt;Minivans&lt;/option&gt;
  &lt;option value="Convertibles"&gt;Convertible Cars&lt;/option&gt;
  &lt;option value="Coupe"&gt;Coupe Cars&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>i have used this code to validate the options </p>
  
  <pre><code>String label=driver.findElement(By.id("vehicleTypeName")).getText();
  
  logger.info("Brand names are \t" + label );
  </code></pre>
  
  <p>But it is printing all the brands including "-Select Style-" this item. but  I don't want to print this "-Select Style-" value.but  I want to validate only brand names. please help me  with this.</p>