title: TestCafe: Testing a Page Opening a PDF in a New Tab
body: <p>Part of the web application I am testing is to click a button, which normally opens a PDF in a new tab. This enables the user to go forward in the application. The PDF can be ignored.</p>
  
  <p>Currently, my strategy is to click the button and then navigate back using ClientFunction. TestCafe successfully opens the PDF when the button is clicked, but it is opened in the same tab and the test is then stuck. Navigating back changes the URL, but the PDF is still displayed.</p>
  
  <pre class="lang-js prettyprint-override"><code>
      const goBack = ClientFunction(() =&gt; window.history.back())
  
      await this.t.click(this.button)
      await this.t.wait(10000)
  
      await goBack()
  </code></pre>
  
  <p>Is TestCafe currently able to bypass this issue, as I don't need to actually do anything with the PDF?</p>