引入Keys模块
from selenium.webdriver.common.keys import Keys
输入框输入内容
driver.find_elment_by_id("kw").send_keys('seleniumm')
删除多输入的一个m
driver.find_element_by_id('kw').send_keys(Keys.BACK_SPACE)
输入空格键+“教程”
druver.find_element_by_id('kw').send_keys(Keys.SPACE)
driver.find_element_by_id('kw').sens_keys('教程')
ctrl+a全选输入框内容
driver.find_element_by_id('kw').send_keys(Keys.CONTROL,'x')
ctrl+x 剪切输入框内容
driver.find_element_by_id('kw').send_keys(Keys.CONTROL,'x')
ctrl+v 粘贴内容到输入框
driver.find_elemnt_by_id('kw').send_keys(Keys.CONTROL,'v')
通过回车键来替代点击操作
driver.find_element_by_id('kw').send_keys(Keys.ENTER)