title: How to download a PDF file with selenium python webdriver?
body: <p>Website: <a href="http://mbct.com/wp-content/uploads/Eisendrath-Jan-2016.pdf" rel="nofollow noreferrer">http://mbct.com/wp-content/uploads/Eisendrath-Jan-2016.pdf</a></p>
  
  <p>Error: unable to locate the element</p>
  
  <p>Maybe this is because the download icon will disappear when I don't do something?</p>
  
  <p>This is my code:</p>
  
  <pre><code># coding=utf-8
  from selenium import webdriver
  from selenium.webdriver.common.action_chains import ActionChains
  from selenium.webdriver.common.keys import Keys  
  import time
  import os
  site = 'http://mbct.com/wp-content/uploads/Eisendrath-Jan-2016.pdf'
  br = webdriver.Chrome()
  br.get(site)
  br.find_element_by_xpath('//*[@id="icon"]').click()
  </code></pre>