title: Fail to download file with opened new tab in headless mode on Linux
body: <p>As this answer by myself:
  <a href="https://stackoverflow.com/questions/59214185/how-to-download-files-headless-in-selenium-java-when-download-happens-in-new-t/59389494#59389494">How to download files headless in Selenium (Java) when download happens in new tab?</a> </p>
  
  <p>If download button trigger download action in opened new tab, I will switch to new tab and send command(as below code) to download file.</p>
  
  <pre><code>def enable_download_in_headless_chrome(self, driver, download_path):
      driver.command_executor._commands["send_command"] = ("POST", '/session/$sessionId/chromium/send_command')
      params = {
          'cmd': 'Page.setDownloadBehavior',
          'params': {'behavior': 'allow', 'downloadPath': download_path}
      }
  
      driver.execute("send_command", params)
  </code></pre>
  
  <p><strong>I found that the above method failed on linux occasionally.</strong></p>
  
  <p>When driver got the error, it would be crashed for a long time.
  (I detect the situation from my error handling with retry.)</p>
  
  <p>Error message:</p>
  
  <blockquote>
    <p>Message: timeout<br>
    (Session info: headless chrome=77.0.3865.120)</p>
  </blockquote>
  
  <p>And I have looked at solution with the issue discussion but no one can solve it: <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=696481" rel="nofollow noreferrer">https://bugs.chromium.org/p/chromium/issues/detail?id=696481</a></p>
  
  <p>I guess the root cause is that I send enable download command before the new tab <strong>in ready state</strong>? </p>
  
  <p>Please help me to find the solution. Thanks.</p>