QTP学习笔记,六月十号

比较实用的:快捷键

dim  ws

set ws=createobject("wscript.shell")

ws.exec "notepad"   ‘打开记事本

ws.sendkeys "{a 10}"   '在记事本中,输入十次字母a

ws.sendkeys "{down}"  '按下向下光标

ws.sendkeys "{enter}"   '按下回车键

ws.sendkeys " %"+"{h}"  '输入alt+h快捷键

换种方式(对象库中存在记事本)

windows("记事本").dialog("记事本").type micAltDwn+"{h}"+micAltUp  ' 在记事本中使用alt+h 快捷键 micAltDwn 按下alt健 micAltUp 放开alt建

 

 

QTP按键列表

micCtrlDwn  Presses the Ctrl key. 
micCtrlUp  Releases the Ctrl key. 
micLCtrlDwn  Presses the left Ctrl key. 
micLCtrlUp  Releases the left Ctrl key. 
micRCtrlDwn  Presses the right Ctrl key. 
micRCtrlUp  Releases the right Ctrl key. 
micAltDwn  Presses the Alt key. 
micAltUp  Releases the Alt key. 
micLAltDwn  Presses the left Alt key. 
micLAltUp  Releases the left Alt key. 
micRAltDwn  Presses the right Alt key. 
micRAltUp  Releases the right Alt key. 
micShiftDwn  Presses the Shift key. 
micShiftUp  Releases the Shift key. 
micLShiftDwn  Presses the left Shift key. 
micLShiftUp  Releases the left Shift key. 
micRShiftDwn  Presses the right Shift key. 
micRShiftUp  Releases the right Shift key. 
micIns  Presses the Insert key. 
micDel  Presses the Delete key. 
micHome  Presses the Home key. 
micEnd  Presses the End key. 
micPgUp  Presses the Page Up key. 
micPgDwn  Presses the Page Down key. 
micUp  Presses the Up arrow key. 
micDwn  Presses the Down arrow key. 
micLeft  Presses the Left arrow key. 
micRight  Presses the Right arrow key. 
micEsc  Presses the Esc key. 
micBack  Presses the Backspace key. 
micReturn  Presses the Return key. 
micTab  Presses the Tab key. 
micBreak  Presses the Break key. 
micPause  Presses the Pause key. 
micPrintScr  Presses the Print Screen key. 
micWinLogoDwn  Presses the Windows Logo key. 
micWinLogoUp  Releases the Windows Logo key. 
micLWinLogoDwn  Presses the left Windows Logo key. 
micLWinLogoUp  Releases the left Windows Logo key. 
micRWinLogoDwn  Presses the right Windows Logo key. 
micRWinLogoUp  Releases the right Windows Logo key. 
micAppKey  Presses the Application key. 
micF1  Presses the F1 key. 
micF2  Presses the F2 key. 
micF3  Presses the F3 key. 
micF4  Presses the F4 key. 
micF5  Presses the F5 key. 
micF6  Presses the F6 key. 
micF7  Presses the F7 key. 
micF8  Presses the F8 key. 
micF9  Presses the F9 key. 
micF10  Presses the F10 key. 
micF11  Presses the F11 key. 
micF12  Presses the F12 key. 
micNumLockOn  Turns on the Num Lock. 
micCapsLockOn  Turns on the Caps Lock. 
micScrollOn  Turns on the Scroll Lock. 
micNumLockOff  Turns off the Num Lock. 
micCapsLockOff  Turns off the Caps Lock. 
micScrollOff  Turns off the Scroll Lock.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值