webdriver根据LINK_TEXT获取元素
#encoding = utf-8 import time from selenium import webdriver from selenium.webdriver.common.by import By driver = webdriver.Chrome() #打开百度首页 driver.get("https://www.baidu.com") #根据LINK_TEXT获取元素 driver.find_element(by=By.LINK_TEXT,value="新闻").click() time.sleep(6) driver.quit()
标签:webdriver,TEXT,driver,获取,LINK,import From: https://www.cnblogs.com/dongtian/p/17496941.html