url = correct_url(url)
browser = webdriver.Chrome()
browser.get(url)
browser.find_element_by_xpath('//*[@title="New chat"]').click()
drawer_body = browser.find_elements_by_class_name('drawer-body')
browser.execute_script('arguments[0].scrollTop = arguments[0].scrollHeight', drawer_body)
Get the 'div' element, this has a list and will be scrolled
drawer_body = browser.find_elements_by_class_name('drawer-body')
The line below scrolls very fast and reaches the bottom but this does not load data. Is there any way I can slowly scroll into drawer_body element?.
browser.execute_script('arguments[0].scrollTop = arguments[0].scrollHeight', drawer_body)
I am trying to implement the below script using python and selenium. http://ctrlq.org/code/19966-whatsapp-phone-numbers
drawer_bodyelement it makes a request to the server, you can fetch what request that is. Open the network tab and try to request the link manually and see what happens, if you provide the url I can take a look at it