title: Tampermonkey select a dropdown value with name
body: <p>I want Tampermonkey to change a select drop down to a specific country. The HTML is formatted like;</p>
  
  <pre><code>  &lt;label&gt;Country&lt;/label&gt;
      &lt;span class="select_wrapper"&gt;
        &lt;select name="shipping_country_id"&gt;
          &lt;option value="46"&gt;Afghanistan&lt;/option&gt;
          &lt;option value="47"&gt;Albania&lt;/option&gt;
          &lt;option value="42"&gt;United Kingdom&lt;/option&gt;
          &lt;option value="43" selected=""&gt;United States&lt;/option&gt;
        &lt;/select&gt;
        &lt;span class="value"&gt;United States&lt;/span&gt;
      &lt;/span&gt;
  </code></pre>
  
  <p>I have tried;</p>
  
  <pre><code>("select[name='shipping_country_id'] option[value='42']", clickNode, true);
  </code></pre>
  
  <p>and</p>
  
  <pre><code> (document.querySelector &amp;&amp; document.querySelector('select[name="shipping_country_id"]') || []).value = '42';
  </code></pre>
  
  <p>After reading <a href="https://stackoverflow.com/questions/41421019/tampermonkey-to-select-a-dropdown-value-it-has-no-id-or-name-just-a-class">Tampermonkey to select a dropdown value. It has no ID or name, just a class?</a>
  I tried using the same method used in that answer;</p>
  
  <pre><code>    waitForKeyElements ("shipping_country_id:has(option[value='42'])", selectCountryDropdown);
  
  function selectCountryDropdown (jNode) {
  var evt = new Event ("click");
  jNode[0].dispatchEvent (evt);
  
  jNode.val('42');
  
  evt = new Event ("change");
  jNode[0].dispatchEvent (evt);
  }
  </code></pre>
  
  <p>Am I missing something or trying the wrong thing?</p>