Answer the question
In order to leave comments, you need to log in
Why doesn't scrolling with keys work in Selenium?
The task is this: on the site, when you click on a button, a window pops up where there is scrolling. I also need to insert scrolling into the loop (Because the block itself is infinite), so I decided to use scrolling with the END or PAGE_DOWN keys
block = browser.find_element_by_class_name('isgrP') #Найти блок, где нужно прокручиать
block.click() #Клик по блоку
block.send_keys(Keys_END) #Прокрутить на 1 шаг
File "c:/Users/Eugene/Documents/Python/Tests/Inst/instparse.py", line 28, in
block.send_keys(Keys_PAGE_DOWN)
NameError: name 'Keys_PAGE_DOWN' is not defined
browser.find_element_by_tag_name('body').send_keys(Keys_END)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question