文件名:test15.py
#coding=utf-8 from selenium import webdriver import time,os driver = webdriver.Chrome() driver.get("http://www.baidu.com") driver.find_element_by_id("kw").send_keys("selenium") time.sleep(2) driver.find_element_by_id("su").click() time.sleep(5) js = "window.scrollTo(600,600);" driver.execute_script(js) print(‘aa‘) time.sleep(5) driver.quit()
时间: 2024-12-05 21:40:48