title: selenium chromedriver prevent unexpected alert open: {Alert text : }
body: <p>i'm trying to prevent this alert,</p>
  
  <pre><code>Traceback (most recent call last):
    File "app.py", line 171, in &lt;module&gt;
      main()
    File "app.py", line 109, in main
      clipper = driver.find_elements_by_css_selector("div.btn")
    File "/home/blaster/.local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 605, in find_elements_by_css_selector
      return self.find_elements(by=By.CSS_SELECTOR, value=css_selector)
    File "/home/blaster/.local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 983, in find_elements
      'value': value})['value'] or []
    File "/home/blaster/.local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
      self.error_handler.check_response(response)
    File "/home/blaster/.local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 241, in check_response
      raise exception_class(message, screen, stacktrace, alert_text)
  selenium.common.exceptions.UnexpectedAlertPresentException: Alert Text: None
  Message: unexpected alert open: {Alert text : }
    (Session info: headless chrome=65.0.3325.181)
    (Driver info: chromedriver=2.35.528139 (47ead77cb35ab2a9a23218b282151362a66cd662),platform=Linux 4.4.0-116-generic x86_64)
  </code></pre>
  
  <p>I have tried to use (from <a href="https://stackoverflow.com/a/45288632/9137919">this answer</a>) :</p>
  
  <pre><code>driver.execute_script("window.alert = function() {};")
  </code></pre>
  
  <p>but it doesn't work, thank you !</p>