from selenium import webdriver
from selenium.webdriver.common.keys import Keys

browser = webdriver.Chrome(executable_path=r'D:\Downloads\AQA\chromedriver_win32\chromedriver.exe')
browser.implicitly_wait(10)

browser.get('http://example.webscraping.com/')

browser.maximize_window() #розкриває вікно

i = 0
while i < 5:
    links = browser.find_elements_by_css_selector('#results a')
    countries = [link.text for link in links]
    print(countries)
    # browser.find_element_by_xpath('//*[@id="pagination"]/a').click()   # тут проблема що Xpath одинаковий в Next i Prev
    browser.find_element_by_partial_link_text('Next').click()
    i = i + 1