title: Python selenium - How to repeatedly select buttons on multiple pages - element not visible
body: <pre><code>import selenium
  from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  
  browser = webdriver.Chrome()
  browser.get('https://wj.qq.com/s/2214142/51db') # survey link
  
  # First page - click "Next" button, it works
  NextButton = browser.find_element_by_class_name('survey_nextpage') # got to next page
  NextButton.click()
  
  
  # Second page - click one of the scale button between 1-5
  answers = browser.find_elements_by_class_name('star_item') # it works
  answers[4].click() # it works
  
  NextButton.click() # it works
  
  
  # Third page - click one of the scale button as 2nd page
  answers = browser.find_elements_by_class_name('star_item') # either with or without this statement, the next line will give error
  answers[2].click() # it throws error
  
  NextButton.click()
  </code></pre>
  
  <p>Starting from page 2, each webpage contains a 1-5 scale (5 buttons) with exactly same format. When the code runs till 3nd page, it will give error like this: </p>
  
  <pre><code>ElementNotVisibleException: element not visible
    (Session info: chrome=67.0.3396.87)
    (Driver info: chromedriver=2.40.565498 (ea082db3280dd6843ebfb08a625e3eb905c4f5ab),platform=Windows NT 10.0.17134 x86_64)
  </code></pre>
  
  <p>As I already catched the answer options on Page 2, I don't know why it does work for page 3 which has exactly same scale format as Page 2. </p>
  
  <p>How can I repeatedly apply the same method to choose an option to next following 5 pages with the same survey format?</p>
  
  <p>Any suggests will be greatly appreciated. Thanks!</p>