title: Python Selenium loop keeps using the first URL, doesnt quit loop
body: <p>I need to:</p>
  <ol>
  <li>Open a new browser window.</li>
  <li>Open a  from an array URL</li>
  <li>Do some actions (not shown)</li>
  <li>Quit the browser window</li>
  <li>Loop until all URLs have been opened.</li>
  </ol>
  <p>ACTUAL RESULT:
  It keeps opening a new browser window, and only goes to the first URL (google.com), then closes it... and re-opens a new window at Google.com.  The loop is infinite and doesn't stop after 3 URLs in this example.</p>
  <p>EXPECTED/DESIRED RESULT:
  Loop through the URLs, and then stop the script once done (in this case, opening the browser 3 times, loading 3 different URLs, closing each browser)</p>
  <p>Any help would be appreciated.</p>
  <p>This is the code I tried</p>
  <pre><code>urlstoloop = [&quot;http://google.com&quot;,
  &quot;http://yahoo.com&quot;,
  &quot;http://msn.com&quot;]
  
  i = 0
  while i &lt; len(urlstoloop):
    web = webdriver.Chrome()
    web.get(urlstoloop[i])
  
  
  
  
  
    CUSTOM CODE
  
  
  
    web.quit()
  
  
  
  i += 1
  </code></pre>