51Testing软件测试论坛

标题: 我想使用sendkey方法调用ctrl+f的组合键 [打印本页]

作者: wangzhu2008    时间: 2008-5-16 11:52
标题: 我想使用sendkey方法调用ctrl+f的组合键
如题,我应该怎么做啊?
作者: xiaonan    时间: 2008-5-16 13:35
http://bbs.51testing.com/viewthr ... 53&statsdata=69||114921  可以参考一下这个帖子
作者: walker1020    时间: 2008-5-16 14:52
在 QTP 的帮助里面 搜索 sendkey,然后根据说明 自己写代码就可以了
作者: walker1020    时间: 2008-5-16 14:53
在论坛的 此版块,搜索 sendkey,肯定会得到一大把搜索结果。
作者: hsjzfling    时间: 2008-5-16 16:07
帮助中写得非常完善,比绝大多数的帖子中的都要完善多了~~
单个键的如下:
Some keystrokes do not generate characters (such as ENTER and TAB). Some keystrokes represent actions (such as BACKSPACE and BREAK). To send these kinds of keystrokes, send the arguments shown in the following table:
KeyArgument
BACKSPACE{BACKSPACE}, {BS}, or {BKSP}
BREAK{BREAK}
CAPS LOCK{CAPSLOCK}
DEL or DELETE{DELETE} or {DEL}
DOWN ARROW{DOWN}
END{END}
ENTER{ENTER} or ~
ESC{ESC}
HELP{HELP}
HOME{HOME}
INS or INSERT{INSERT} or {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}

To send keyboard characters that are comprised of a regular keystroke in combination with a SHIFT, CTRL, or ALT, create a compound string argument that represents the keystroke combination. You do this by preceding the regular keystroke with one or more of the following special characters:
KeySpecial Character
SHIFT+
CTRL^
ALT%


组合键就看这里
Note   When used this way, these special characters are not enclosed within a set of braces.
To specify that a combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, create a compound string argument with the modified keystrokes enclosed in parentheses. For example, to send the keystroke combination that specifies that the SHIFT key is held down while:
作者: shangguoli    时间: 2008-5-21 10:36
标题: 回复 5# 的帖子
谢谢




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2