title: Puppeteer: Escape square brackets in selector
body: <p>I need to select elements with ids that contain square brackets.</p>
  
  <p>i.e.</p>
  
  <pre><code>#element[0]
  </code></pre>
  
  <p>However, I keep getting:</p>
  
  <blockquote>
    <p>Error: failed to find element matching selector "element[0]"</p>
  </blockquote>
  
  <p>I've escaped the element in the selector with <code>\</code>, but that doesn't work.</p>
  
  <pre><code>page.select("#fruit\[0\]", "apples")
  </code></pre>
  
  <p>Double backslash escapes don't work either. i.e.:</p>
  
  <pre><code>page.select("#fruit\\[0\\]", "apples")
  </code></pre>
  
  <p>UPDATE: The element I'm trying to select:</p>
  
  <pre><code>&lt;select id="fruit[0]"&gt;
    &lt;option&gt;Please make a selection&lt;/option&gt;
    &lt;option&gt;apples&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>NOTE: I get the same error even when I try to use the page.waitFor method with the query above.</p>