webdriver根据PARTIAL_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") #根据PARTIAL_LINK_TEXT获取元素 driver.find_element(by=By.PARTIAL_LINK_TEXT,value="新").click() time.sleep(6) driver.quit()
标签:webdriver,PARTIAL,TEXT,driver,LINK,import From: https://www.cnblogs.com/dongtian/p/17496944.html