I am working on python selenium with chrome-webdriver in window 8. I came across a page that loads data while scrolling using ajax.I tried typing jquery and the following links do not work for me.
Link 1 Link 2 Link 3
Can someone give me the right way to follow.
EDIT -------------
This is my incomplete code after alecx answer
nam = driver.find_element(By.CLASS_NAME ,'_wu')
revcnt = driver.find_element(By.XPATH ,"//span[@class='_Mnc _yz']")
revcnt = int(revcnt.text.replace(" reviews","").strip())
print revcnt
wait = WebDriverWait(driver, 10)
wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, "span.review-snippet")))
while True:
reviews = driver.find_elements_by_css_selector("div._ju")
if len(reviews)<revcnt:
driver.execute_script("arguments[0].scrollIntoView();", reviews[-1])
else:
driver.quit()
print len(reviews)
But the problem is getting out of the while! Loop
I tried it .
user2691314
source
share