title: How can all options from a drop-down list (select) box be tested in Cypress?
body: <p>How can we select all <code>options</code> from a normal drop-down list box and verify them using Cypress?</p>
  <pre class="lang-html prettyprint-override"><code>&lt;select id=&quot;cars_list&quot;&gt;
    &lt;option value=&quot;volvo&quot;&gt;Volvo&lt;/option&gt;
    &lt;option value=&quot;saab&quot;&gt;Saab&lt;/option&gt;
    &lt;option value=&quot;mercedes&quot;&gt;Mercedes&lt;/option&gt;
    &lt;option value=&quot;audi&quot;&gt;Audi&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  <pre class="lang-js prettyprint-override"><code>//The below test can check only for one option, how can we verify the rest? 
  
  describe(&quot;Select all values from drop down list&quot;, function() {
    it(&quot;Cypress test and verify all options&quot;, function() {
    cy.visit(&quot;Https://sometestingsite.com&quot;)  
    cy.get('#cars_list').then(function($select){
     $select.val('volvo')
     })
     cy.get('select').should('have.value', 'volvo')
     });
  });
  </code></pre>