0
I’m running a boot to collect information from Facebook for a political survey. However, when I collect the comments I’m not getting the Scroll Down of the page.
I’ve tried several code formats, but scroll down only happens outside the pop-up, IE, the main page on facebook and not the one where the image and comments appear. I have tried several ways, but without success - I leave below some codes I have tried.
the_last_in_list = driver.find_elements_by_xpath('//div[@class="_4swz _293g"]')[-1]
the_last_in_list.location_once_scrolled_into_view
for i in range(10):
driver.execute_script("window.scrollBy(0,500)","")
sleep(2)
page = driver.find_element_by_tag_name("html")
page.send_keys(Keys.END)
I’m grateful for your help/
Dude, I think you need to get Lenium to click first on the div that contains the comments, I inspected element here and found a
form#u_r_2
, have it clicked before sending thescrollBy
– Boi Programador