from selenium.webdriver.common.keys import Keys ele = driver.find_element_by_xpath("输入框").send_keys("密码") ele.send_keys(Keys.ENTER)