基本的 python Selenium

from selenium import webdriver

driver = webdriver.Chrome()  # Creates a new chromedriver instance
driver.get("https://www.python.org/")  # Go to https://www.python.org/
# Sends the text "python" to the text search box
driver.find_element_by_id("id-search-field").send_keys("python")
# Click on the search button
driver.find_element_by_css_selector("button[type=\"submit\"]").click()