title: Click element using CSS selector in puppeteer
body: <p>I want to click an object using css selector on puppeteer, I am using device emulator(iphone X).</p>
  <p>I have the following two css  selector for same object,</p>
  <pre><code>div:nth-of-type(1) &gt; .canvasContentDiv.container_1vt1y2p &gt; div &gt; div:nth-of-type(4) .react-knockout-control &gt; div
  </code></pre>
  <p>and</p>
  <pre><code>[aria-labelledby='pa-gallery-label-1'] [data-control-id='24'] [touch-action]
  </code></pre>
  <p>Any help how to do it, tried with following two ways but not working ?</p>
  <p>Method 1:</p>
  <pre><code>const elementHandle = await page.evaluate(() =&gt; { const element = document.querySelector(&quot;[aria-labelledby='pa-gallery-label-1'] [data-control-id='24'] [touch-action]&quot;); });
  await page.waitFor(500);
  elementHandle.click();
  </code></pre>
  <p>Method 2:</p>
  <pre><code> await page.click(&quot;[aria-labelledby='pa-gallery-label-1'] [data-control-id='24'] [touch-action]&quot;);
  </code></pre>