from selenium import webdriver
# 创建浏览器对象
path = 'files/chromedriver.exe'
browser = webdriver.Chrome(path)
# 访问地址
url = 'https://www.baidu.com'
browser.get(url)
input = browser.find_element_by_id('su')
.get_attribute('class')
print(input.get_attribute('class'))
.tag_name
print(input.tag_name)
.text
a = browser.find_element_by_link_text('hao123')
print(a.text)