webdriver通过tag_name定位
代码示例:
#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获取元素 tag_name=driver.find_element(by=By.TAG_NAME,value='form').get_attribute("name") print(tag_name) time.sleep(6)
标签:webdriver,name,driver,selenium,tag,import From: https://www.cnblogs.com/dongtian/p/17498797.html