title: Extracting text from a <p> tag within an iframe with Puppeteer
body: <p>I'm having some difficulties extracting text from within an iframe. </p>
  
  <p>Given the code: </p>
  
  <pre><code>&lt;iframe id="iframe" src="https://myamazingapp/2637374848489595" 
  style="width:100%;border:none" height="858px" css="1"&gt;&lt;/iframe&gt;
  &lt;div id="document"&gt;
     &lt;html lang ="en"&gt;
        &lt;head&gt;...&lt;/head&gt;
       &lt;body onLoad="resize();"&gt;
           &lt;div&gt;class = "app"&gt;
               &lt;div class = my-response"&gt;
               &lt;div class="my-response__iconcontainer&gt;..
          &lt;/div&gt;
          &lt;div class="my-response__copy"&gt;
             &lt;p&gt;Thank you for filling out my form&lt;/p&gt;
          &lt;/div&gt;
       &lt;/div&gt;
  &lt;/div&gt;//....other members
  </code></pre>
  
  <p>My snippet of Puppeteer is as follows:</p>
  
  <pre><code>  const frame = page.frames().find(frame =&gt; frame.name() === 'iframe');
    await frame.$('body &gt; div &gt; div &gt; div &gt; div.my-response__copy &gt; p');
    const text = page.evaluate(el =&gt; el.innerHTML, await page.$('body &gt; div &gt; div &gt; div &gt; div.my-response__copy &gt; p'));
    expect(text).to.equal('Thank you for filling out my form');
  </code></pre>
  
  <p>The stacktrace starts as:</p>
  
  <pre><code> { AssertionError: expected {} to equal 'Thank you for filling out my form.'
  at changeOptions (/Users/firstname.lastname/Documents/projects/qa-tests/tests/widget/fillform.js:49:25)
  at process._tickCallback (internal/process/next_tick.js:68:7)
  message:
   'expected {} to equal \'Thank you for filling out my form\'',
   showDiff: true,
   actual: Promise { &lt;pending&gt; },
   expected: 'Thank you for filling out my form' }
  </code></pre>
  
  <p>Any ideas how to extract the text so I can assert against it?</p>
  
  <p>Thanks</p>