from time import sleep
from selenium import webdriver

driver = webdriver.Chrome()
url = "https://www.baidu.com/"
driver.get(url)
print(driver.title)
driver.find_element_by_link_text("登录").click()
sleep(2)
driver.find_element_by_link_text("立即注册").click()
print(driver.title)

= RESTART: C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\tube.py
百度一下,你就知道
百度一下,你就知道


↙↙↙阅读原文可查看相关链接,并与作者交流