title: Download images using selenium
body: <p>I want to download and save images using selenium in python2.7</p>
  
  <p>I've tried:  </p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.action_chains import ActionChains
  from selenium.webdriver.common.keys import Keys
  
  url= "https://in.images.search.yahoo.com/images/view;_ylt=A2oKiHPRis1VplIALaEO9olQ;_ylu=X3oDMTIyN2I2OHZkBHNlYwNzcgRzbGsDaW1nBG9pZANjN2U1ZjU4NjAwMDQ1MDA0OGExZGMxY2Y0MzMyMDk0MwRncG9zAzEEaXQDYmluZw--?.origin=&amp;back=https%3A%2F%2Fin.images.search.yahoo.com%2Fyhs%2Fsearch%3Fp%3D%2522Eiffel%2BGreens%2522%2BBalewadi%2509Pune%26n%3D60%26ei%3DUTF-8%26y%3DSearch%26type%3Dff.40.w81.hp.04-01.in.avg._.0715av%26fr%3Dyhs-avg-fh_lsonsw%26fr2%3Dsb-top-in.images.search.yahoo.com%26hsimp%3Dyhs-fh_lsonsw%26hspart%3Davg%26tab%3Dorganic%26ri%3D1&amp;w=556&amp;h=309&amp;imgurl=www.propertyonepune.com%2Fimg%2Fgallery%2F0becda3e53f8db646a699e54b1333a4c.jpg&amp;rurl=http%3A%2F%2Fwww.propertyonepune.com%2Fproperties%2F46%2FBalewadi&amp;size=49.8KB&amp;name=...+bungalows+by+Eiffel+Developers+%26+Realtors+Ltd.+at+%3Cb%3EBalewadi%3C%2Fb%3E%2C+%3Cb%3EPune%3C%2Fb%3E&amp;p=%22Eiffel+Greens%22+Balewadi%09Pune&amp;oid=c7e5f586000450048a1dc1cf43320943&amp;fr2=sb-top-in.images.search.yahoo.com&amp;fr=yhs-avg-fh_lsonsw&amp;tt=...+bungalows+by+Eiffel+Developers+%26+Realtors+Ltd.+at+%3Cb%3EBalewadi%3C%2Fb%3E%2C+%3Cb%3EPune%3C%2Fb%3E&amp;b=0&amp;ni=21&amp;no=1&amp;ts=&amp;tab=organic&amp;sigr=11lu74lc1&amp;sigb=17t67hvmu&amp;sigi=1284god0v&amp;sigt=12i2gtekb&amp;sign=12i2gtekb&amp;.crumb=wZ3uTmSmDfL&amp;fr=yhs-avg-fh_lsonsw&amp;fr2=sb-top-in.images.search.yahoo.com&amp;hsimp=yhs-fh_lsonsw&amp;hspart=avg&amp;type=ff.40.w81.hp.04-01.in.avg._.0715av"
  driver = webdriver.Firefox()
  driver.get(url)
  
  path = '//div[@class="iholder"]//img[@src]'
  for k in driver.find_elements_by_xpath(path):
      items = []
      src = (k.get_attribute('src')).encode('utf8')
      items.append(src)
      print items
      for lm in items:
          driver.get(lm)
          driver.sendKeys(Keys.Control + "s")
          driver.send_keys(Keys.Enter)
  </code></pre>
  
  <p>It's giving me error:  </p>
  
  <pre><code>Traceback (most recent call last):
  File "C:/Users/Heypillow/Desktop/download.py", line 17, in &lt;module&gt;
  driver.sendKeys(Keys.Control + "s")
  AttributeError: 'WebDriver' object has no attribute 'sendKeys'
  </code></pre>
  
  <p>I've tried with:  </p>
  
  <pre><code>driver.send_keys(Keys.CONTROL + "s")
  </code></pre>
  
  <p>Same error is showing<br>
  <strong>What should I do to save the images?</strong> Thanks in advance</p>