title: Python - Selenium Next Page with condition
body: <p>I'm pretty new to python, I have a webpage that has 50 pages. each page has 50 users. I need to multi-select users on one page after another then click on download data. There's one limitation that I can only download data for 500 users at once. So I need to multi-select the users in the first 10 pages then download their data and then multi-select the users in the next 10 pages then download and etc.</p>
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support import expected_conditions as EC
  
  class Runtest():
      def test(self):
          driver_location = 'C:\\chromedriver.exe'
          os.environ[&quot;webdriver.chrome.driver&quot;] = driver_location
          driver = webdriver.Chrome(driver_location)
          driver.get(&quot;http://example.com/&quot;)
  
          Next_Page = &quot;XPATH&quot;
          Multi_Select = &quot;XPATH2&quot;
          Download_Data = &quot;XPATH3&quot;
         driver.find_element_by_xpath(Multi_Select).click()
         driver.find_element_by_xpath(Next_Page).click()
         driver.find_element_by_xpath(Download_Data).click()
  </code></pre>
  <p>Would appreciate some guidance on how to get that condition done.</p>