selenium鼠标下滑操作
# coding = utf-8import timefrom selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.common.action_chains import ActionChainsdriver = webdriver.Chrome()# 打开指定网址driver.get("https://www.cnblogs.com/xdclass/p/9842054.html")xia=driver.find_element(By.XPATH, '//*[@id="post_next_prev"]/a[4]')driver.execute_script('window.scrollTo(0,1000)')time.sleep(5)print("鼠标下拉结束")xia.click() # 点击指定a标签time.sleep(5)driver.quit() 来源:博客园 作者: 阿杰_linda 链接:https://www.cnblogs.com/ajie-linda/p/11655737.html