Bois and Ladies,
Good evening to all of you from the the Other Side ,
I am trying to scroll and find some elements in a Drop Box, the issue is I do not want to directly scroll 4600 nodes as a value but like 100 at a time and then look for the element.
I do not understand how to do that to the below few lines of code.
Any help would be highly appreciated.
# SCROLL TO CHECK
browser.execute_script(''' document.evaluate( '//form/div/div[1]/div/div[2]/div', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue.scroll(0,4600); ''')
time.sleep(random.uniform(1.0,2.0))
# FOOD TYPE
fType = browser.find_element(By.XPATH, "//html/body/div/div/div/div/div/div/div/div/div/div/form/div/div/div/div/div/div/a/span[text()[contains(.,'Pizza')]]")
browser.execute_script("arguments[0].click();", fType)
time.sleep(random.uniform(1.0,3.0))
Thank you.