title: Can't drive headless using selenium python on Chome version 81 above
body: <p>I want to download a csv from url that have pop up box using selenium python. When I use Chrome version 80.xx and chromedriver 83 it works well while in headless mode. Here it is my script</p>
  <pre><code>def chrome(path):
      options = Options()
      options.add_argument(&quot;--headless&quot;)
      prefs = {
      &quot;download.default_directory&quot;: r&quot;{}&quot;.format(path),
      &quot;download.prompt_for_download&quot;: False,
      &quot;download.directory_upgrade&quot;: True
      }
  
      options.add_experimental_option('prefs', prefs)
      options.add_argument('--ignore-ssl-errors=yes')
      options.add_argument('--ignore-certificate-errors')
      driver = webdriver.Chrome(chrome_options=options, executable_path = r'path\chromedriver.exe')
      #driver.set_window_position(-10000,0)
      return driver
  
  path = os.path.join(os.getcwd(),'downloaded_files')
  driver = chrome(path)
  
  #get into link
  driver.get(url)
  
  #insert login
  driver.find_element_by_id('username').send_keys(username)
  driver.find_element_by_id('password').send_keys(password)
  driver.find_element_by_css_selector('.login-button').click()
  time.sleep(2)
  </code></pre>
  <p>After my Chrome update and version changed to 83. I cant use selenium headless mode again, it says that</p>
  <pre><code>selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {&quot;method&quot;:&quot;css selector&quot;,&quot;selector&quot;:&quot;[id=&quot;username&quot;]&quot;}
    (Session info: headless chrome=83.0.4103.116)
  </code></pre>
  <p>I've already tried using chrome 81 and chromedriver 83, it gives same problem. Anyone have problem like this?</p>