title: Single Line Javascript method to find item with specific text then invoke a click
body: <p>I'm wanting to be able to click on an input that has no ID thats inside a LABEL that has no ID either.</p>
  
  <p>Here is sample HTML...</p>
  
  <pre><code>&lt;label&gt;
  &lt;input type="radio" /&gt;
   item1
  &lt;/label&gt;
  &lt;label&gt;
  &lt;input type="radio" /&gt;
   item2
  &lt;/label&gt;
  &lt;label&gt;
  &lt;input type="radio" /&gt;
   item3
  &lt;/label&gt;
  </code></pre>
  
  <p>now using ONLY Javascript.  How could I go about just invoking a click on the item2 in this example?</p>
  
  <p>I know that I could probably do a FOR loop through all the document.getElementsByTag("label") then check the text of each one and then probably invoke a click after I've found the specific label...</p>
  
  <p>BUT i was wondering if it was posssible to do this in a very simplified method instead like using document.querySelectorAll("label") or something to this effect?  like is there noting that would allow me to do like a uh... </p>
  
  <pre><code> document.querySelectorAll("label[text='item2']").click()
  </code></pre>
  
  <p>Nothing like this or anything possible?</p>
  
  <p>Would need to do this on a page that already exists, so creating a Javascript Method to call/reference wouldn't work in this instance</p>
  
  <p><strong>EDIT #1 - based off people stating its impossible for single selectors</strong></p>
  
  <p>If its not possible to do it using a querySelectorAll and you would have to use a For-Loop/While then how would you do this in a single line?</p>
  
  <p>I know sometimes you can do stuff like...</p>
  
  <pre><code>javascript:(function() { document.getElementById('LABELID').value+='SETVALUE'; document.querySelectorAll("Button[type='submit']")[0].click();})()
  </code></pre>
  
  <p>Is it possible to do this search and click in a single line also?</p>