title: How do I iterate and visit each link in a list using selenium and python? How do I click on each link on a Yelp page
body: <p>I would love to visit each link on this yelp page that has Dumpling included in the link text.</p>
  <p><a href="https://i.stack.imgur.com/26UKM.jpg" rel="nofollow noreferrer">Picture of List of Links on yelp</a></p>
  <p>Here is the code. I got to the second page but not sure on how to click into each link. I want each link to open in a new. but only dumpling ones. Thank you. Hope this makes sense.</p>
  <pre><code>all_links = []
  
  #yelp page
  driver.get(&quot;https://yelp.com&quot;);
  
  #Selecting the first box
   type_of_food = driver.find_element_by_id('find_desc')
  
  #Enter Chinese Food
  type_of_food.send_keys('Chinese Food');
  
  #press enter
  type_of_food.send_keys(Keys.ENTER);
  
  
  driver.implicitly_wait(30)
  #Button click
  
  driver.find_element_by_id(&quot;header-search-submit&quot;).click()
  
  
  driver.implicitly_wait(9)
  
  
  
  driver.find_element_by_partial_link_text('Dumpling')
  
  for link in all_links:
      links.append(link.get_attribute('href'))
  </code></pre>