“Прокрутите вниз Selenium Python” Ответ

Python Selenium Scroll All Down

from selenium import webdriver
import time

browser = webdriver.Firefox()
browser.get("https://en.wikipedia.org")
browser.execute_script("window.scrollTo(0,document.body.scrollHeight)")
time.sleep(3)
browser.close()
marcofaga

Прокрутите на элемент Python Selenium

from selenium.webdriver.common.action_chains import ActionChains

element = driver.find_element_by_id("my-id")

actions = ActionChains(driver)
actions.move_to_element(element).perform()
Happy Hawk

Как прокрутить в селене -питоне

   for i in range(20): # adjust integer value for need
       # you can change right side number for scroll convenience or destination 
       driver.execute_script("window.scrollBy(0, 250)")
       # you can change time integer to float or remove
       time.sleep(1)
Dangerous Dog

Selenium scrolk вниз Python

driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
Joyous Jay

Прокрутите вниз Selenium Python

browser.execute_script("window.scrollTo(0,document.body.scrollHeight)")
Expensive Earthworm

Selenium Webdriver прокрутите вниз Python

while driver.find_element_by_tag_name('div'):
    driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
    Divs=driver.find_element_by_tag_name('div').text
    if 'End of Results' in Divs:
        print 'end'
        break
    else:
        continue
Xerothermic Xenomorph

Ответы похожие на “Прокрутите вниз Selenium Python”

Вопросы похожие на “Прокрутите вниз Selenium Python”

Больше похожих ответов на “Прокрутите вниз Selenium Python” по Python

Смотреть популярные ответы по языку

Смотреть другие языки программирования