selenium打开百度

 

import time
from selenium import webdriver
from selenium.webdriver.common.by import By

driver=webdriver.Chrome()
driver.get("https://www.baidu.com/")
input=driver.find_element(By.ID,"kw")
input.send_keys("selenium")
time.sleep(3)
posted @ 2024-03-05 16:13  琳达的博客  阅读(97)  评论(0编辑  收藏  举报