user3237357
user3237357

Reputation: 112

Scrolling through list using selenium Python till end

I'm trying to scroll through my facebook friendlist / chatlist using selenium webdriver via python but it only scrolls web page and not that list.

I tried something like this:

list = driver.find_elements_by_xpath('xpath')
hover = ActionChains(driver).move_to_element(list)
hover.perform()

But nothing happened!

Can anyone please share how it can be done.

Upvotes: 0

Views: 887

Answers (1)

Anand
Anand

Reputation: 1939

Use a for loop.

Say:

for element in list:
    hover = ActionChains(driver).move_to_element(element)

    hover.perform()

Upvotes: 1

Related Questions