title: How to locate Instagram Follow button with selenium (Python)
body: <p>I'm trying to locate the 'follow' button element on an instagram page (using selenium).</p>
  
  <p>I've found the main 'follow' button of a user's page (<a href="https://www.instagram.com/USERNAME/" rel="nofollow noreferrer">https://www.instagram.com/USERNAME/</a>) with the following code:</p>
  
  <pre><code>follow_button = self.driver.find_element_by_css_selector('button')
  </code></pre>
  
  <p>Although after clicking the above element ^,  now I'm trying to locate 'follow' buttons visible when you view a user's followers.
  <a href="https://i.stack.imgur.com/iYCZ1.jpg" rel="nofollow noreferrer">Click here to see which buttons I'm referring to.</a></p>
  
  <p>I've tried the following code but it doesn't work:</p>
  
  <pre><code>acc_follow_buttons = self.driver.find_elements_by_css_selector('button')
  
  for acc in acc_follow_buttons[:15]:
      acc.click() 
      time.sleep(1)
  </code></pre>
  
  <p>I've also tried searching with Xpath, with no luck.</p>
  
  <p>Could anyone with experience in Selenium help me with the code to locate the follow buttons on this page.</p>