Scroll with Selenium in Python: Error

0

I have a list of items on the screen, in which I need to click one by one to parse data. It happens that, at a certain moment, Selenium can not click anymore, because when it tries, the following error happens:

selenium.common.exceptions.WebDriverException: Message: unknown error: Element is not clickable at point

I'm trying to get the screen rolling gradually at each iteration, but I'm not succeeding. When I run the line below

browser.execute_script('window.scroll(0, 200)')

The screen scrolls, then displays the error

selenium.common.exceptions.WebDriverException: Message: unknown error: call function result missing 'value'

Following any further scrolling attempt is ignored. Any suggestions on how to proceed to the situation?

    
asked by anonymous 10.05.2018 / 15:45

1 answer

0

I discovered one more (scrollBy):

try:
    browser.execute_script('window.scrollBy(0, 15)')
except:
    None

I did this way to get around the bug, which I still do not understand because it occurs. But it was enough to get around the problem.

    
10.05.2018 / 16:05