SendKeys总结
1.SendKeys中特殊字符的键代码
BACKSPACE {BACKSPACE}、{BS} 或 {BKSP}
BREAK {BREAK}
CAPS LOCK {CAPSLOCK}
DEL 或 DELETE {DELETE} 或 {DEL}
DOWN ARROW(下箭头) {DOWN}
END {END}
ENTER {ENTER} 或 ~
ESC {ESC}
HELP {HELP}
HOME {HOME}
INS 或 INSERT {INSERT} 或 {INS}
LEFT ARROW(左箭头) {LEFT}
NUM LOCK {NUMLOCK}
PAGE DOWN {PGDN}
PAGE UP {PGUP}
PRINT SCREEN {PRTSC}(保留,以备将来使用)
RIGHT ARROW(右箭头) {RIGHT}
SCROLL LOCK {SCROLLLOCK}
TAB {TAB}
UP ARROW(上箭头) {UP}
F1 {F1}
F2 {F2}
F3 {F3}
F4 {F4}
F5 {F5}
F6 {F6}
F7 {F7}
F8 {F8}
F9 {F9}
F10 {F10}
F11 {F11}
F12 {F12}
F13 {F13}
F14 {F14}
F15 {F15}
F16 {F16}
数字盘加号 {ADD}
数字盘减号 {SUBTRACT}
数字盘乘号 {MULTIPLY}
数字盘除号 {DIVIDE}
2.如何输入空格空格
def SendKeys(keys,
pause=0.05,
with_spaces=False,
with_tabs=False,
with_newlines=False,
turn_off_numlock=True): /
"""
Sends keys to the current window. `keys` : str
A string of keys.
`pause` : float
The number of seconds to wait between sending each key
or key combination.
`with_spaces` : bool
Whether to treat spaces as ``{SPACE}``. If `False`, spaces are ignored.
`with_tabs` : bool
Whether to treat tabs as ``{TAB}``. If `False`, tabs are ignored.
`with_newlines` : bool
Whether to treat newlines as ``{ENTER}``. If `False`, newlines are ignored.
`turn_off_numlock` : bool
Whether to turn off `NUMLOCK` before sending keys. example:: SendKeys("+hello{SPACE}+world+1") would result in ``"Hello World!"``
"""
example:
SendKeys.SendKeys('Hello Word!',0.05,True,True,True,True)
SendKeys总结的更多相关文章
- Selenium_IEDriver操作sendkeys输入速度太慢
通过调用64位IEDriverServer来操控sendkeys方式时,输入速度非常慢.网上说是64位有bug. 解决办法: 使用32位IEDriverServer.
- 解决在CAPSLOCK开启情况下sendkeys大小写异常的问题
http://files.cnblogs.com/files/liuzhaoyzz/sendkeys%E5%A4%A7%E5%B0%8F%E5%86%99.rar 首先利用GetKeyState(vb ...
- C# 模拟键盘操作--SendKey(),SendKeys()
模拟键盘输入就是使用以下2个语法实现的.SendKeys.Send(string keys); //模拟汉字(文本)输入SendKeys.SendWait(string keys); //模拟按键输 ...
- 在chrome下的文本框sendkeys,提示element can't focus--解决方法
在chrome下的文本框sendkeys,提示element can't focus--解决方法(成都-半步流雲,群友解决) 成都-半步流雲1.升级你的chromedriver,2.降chrome版本 ...
- SendKeys:基本使用
使用SendKeys将键击和组合键击发送到活动应用程序.此类无法实例化.若要发送一个键击给某个类并立即继续程序流,请使用Send.若要等待键击启动的任何进程,请使用SendWait. 每个键都由一个或 ...
- SendKeys回车操作类
/************************************************************ FileName: SendKey.cs Description: 模拟键盘 ...
- WScript.SendKeys()的sendkeys发送组合键以及特殊字符
SendKeys.Send("^+{TAB}"); 使用SendKeys将键击和组合键击发送到活动应用程序.此类无法实例化.若要发送一个键击给某个类并立即继续程序流,请使用Send ...
- C#模拟键盘鼠标事件 SendKeys 的特殊键代码表(转)
使用 SendKeys 将键击和组合键击发送到活动应用程序.此类无法实例化.若要发送一个键击给某个类并立即继续程序流,请使用 Send.若要等待键击启动的任何进程,请使用 SendWait. 每个键都 ...
- sendkeys用法详解
将一个或多个按键消息发送到活动窗口,就如同在键盘上进行输入一样. 语法 SendKeys string[, wait] SendKeys 语句的语法具有以下几个命名参数: 部分 描述 string ...
随机推荐
- zTree 异步加载
zTree异步加载数据的简单实现,更为详细的Api请参考 zTree官网 http://www.treejs.cn/ <link href="~/Content/ztree/css ...
- Android(java)学习笔记137:Android中SimpleAdapter,ArrayAdapter和BaseAdapter常见的适配器
1.SimpleAdapter(BaseAdapter子类扩展类): simpleAdapter的扩展性最好,可以定义各种各样的布局出来,可以放上ImageView(图片)等.可以显示比较复杂的列表, ...
- Flex学习第一天(两个数相加)
<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="htt ...
- Azure PowerShell (一)如何安装和配置 Azure PowerShell
什么是 Azure PowerShell? Azure PowerShell 是一组模块,提供用于通过 Windows PowerShell 管理 Azure 的 cmdlet.你可以使用 cmdle ...
- typeof应该注意的地方(网龙公司校招笔试题)
<script language="javascript" type="text/javascript"> alert(new String('a' ...
- ASP保存远程图片文件到本地代码
<% Function SaveRemoteFile(LocalFileName,RemoteFileUrl) SaveRemoteFile=True dim Ads,Retrieval,Get ...
- cookie管理中的一些细节,转的
1.domain表示的是cookie所在的域,默认为请求的地址,如网址为www.jb51.net/test/test.aspx,那么domain默认为www.jb51.net.而跨域访问,如域A为t1 ...
- while循环语句
while(循环条件,返回布尔类型) { 代码执行的操作,或者打印输出. } do whilw循环 do { ...
- ###STL学习--函数对象
点击查看Evernote原文. #@author: gr #@date: 2014-08-13 #@email: forgerui@gmail.com 在stl中,函数对象被大量地使用,用以提高代码的 ...
- OC5_NSMutableString操作
// // main.m // OC5_NSMutableString操作 // // Created by zhangxueming on 15/6/10. // Copyright (c) 201 ...