Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if step != num_pages:
- if step - int(begin) == 0:
- driver.find_element(By.XPATH, '//*[@id="prrFormListResult"]/div[3]/ul/li[2]/a').click()
- time.sleep(1)
- current_pos.insert(0, '<')
- elif step - int(begin) == 1:
- driver.find_element(By.XPATH, '//*[@id="prrFormListResult"]/div[3]/ul/li[4]/a').click()
- time.sleep(1)
- current_pos.insert(1, '...')
- elif step - int(begin) > 1:
- driver.find_element(By.XPATH, '//*[@id="prrFormListResult"]/div[3]/ul/li[5]/a').click()
- time.sleep(1)
- current_pos[3] = step + 1
- current_pos[2] = step
- current_pos[4] = step + 2
- elif abs(step - int(end)) == 1:
- driver.find_element(By.XPATH, '//*[@id="prrFormListResult"]/div[3]/ul/li[5]/a').click()
- time.sleep(1)
- current_pos[2] = step
- current_pos[3] = step + 1
- current_pos.remove('...')
- current_pos.remove('>')
- if step != num_pages:
- if step - int(begin) == 0:
- wait_.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="prrFormListResult"]/div[3]/ul/li[2]/a'))).click()
- wait_.until(EC.invisibility_of_element((By.CLASS_NAME, "prr-form__list-load-img")))
- current_pos.insert(0, '<')
- elif step - int(begin) == 1:
- wait_.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="prrFormListResult"]/div[3]/ul/li[4]/a'))).click()
- wait_.until(EC.invisibility_of_element((By.CLASS_NAME, "prr-form__list-load-img")))
- current_pos.insert(1, '...')
- elif step - int(begin) > 1:
- wait_.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="prrFormListResult"]/div[3]/ul/li[5]/a'))).click()
- wait_.until(EC.invisibility_of_element((By.CLASS_NAME, "prr-form__list-load-img")))
- current_pos[3] = step + 1
- current_pos[2] = step
- current_pos[4] = step + 2
- elif abs(step - int(end)) == 1:
- wait_.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="prrFormListResult"]/div[3]/ul/li[5]/a'))).click()
- wait_.until(EC.invisibility_of_element((By.CLASS_NAME, "prr-form__list-load-img")))
- current_pos[2] = step
- current_pos[3] = step + 1
- current_pos.remove('...')
- current_pos.remove('>')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement