title: Python - Selenium going through array
body: <p>I would like to do automated script. I define an array in start of the program. 
  Later program is opening browser and search in google some specific word (for example apple), next program is clicking in first of string from array and close browser. Later is doing the same but it will click in second of word from array.
  My code:</p>
  
  <pre><code> from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  
  
  driver = webdriver.Chrome("C:/Users/Daniel/Desktop/chromedriver.exe")
  driver.implicitly_wait(30)
  driver.maximize_window()
  
  
  
  
  hasla = ["ispot","myapple"]
  
  for slogan in hasla:
      driver.get("http://www.google.com")
      search_field = driver.find_element_by_id("lst-ib")
  
      search_field.clear()
      search_field.send_keys("apple")
      search_field.submit()
      name = driver.find_element_by_link_text(slogan)
      name.click()
      driver.quit()
      driver.implicitly_wait(10)
  </code></pre>
  
  <p>When Im starting this program from console in windows.
  Program is opening browser, looking for apple click in ispot and clsoe browser but its not opening new browser and it not doing the same for next string in array. Any solution ?</p>
  
  <p>In console i have this:
  <a href="https://i.stack.imgur.com/iU7Pf.png" rel="nofollow noreferrer">screen</a></p>