键盘操作
from selenium.webdriver.common.keys import Keys
- send_keys(Keys.BACK_SPACE) 删除键
- send_keys(Keys.SPACE)空格键
- send_keys(Keys.TAB)制表键
- send_keys(Keys.ESCAPE)回退键
- send_keys(Keys.ENTER)回车键
- send_keys(Keys.CONTROL,'a')全选
- send_keys(Keys.CONTROL,'c')复制
- send_keys(Keys.CONTROL,'x')剪贴
- send_keys(Keys.CONTROL,'v')粘贴
- send_keys(Keys.F1)键盘F1
- ......
- send_keys(Keys.F12)键盘F12
声明 欢迎转载,但请保留文章原始出处:) 博客园:https://www.cnblogs.com/chenxiaomeng/
如出现转载未声明 将追究法律责任~谢谢合作