最忌讳的是抱着希望的猜测,一切凭行事而让思考停止。
QTP如何测试鼠标右键菜单
上一篇 /
下一篇 2009-09-30 13:03:05
51Testing软件测试网+Aa)vD^ ? I读出右键菜单中的内容不知道怎么弄,但按序号点击右键菜单命令是可以做到的。不知道你到底要哪种。
(T/l+utd)P0
8?CT,Rn%m1s%oLL\0webpage中,以QTP附带的订票网站sample为例,edit控件username鼠标右键,点击paste(第4个菜单项)
wiIW:l7C@051Testing软件测试网I8qe/}%@^;q
l"m(zC
cur_replay_type = Setting.WebPackage("ReplayType")51Testing软件测试网 { n3?G;suM.h
Setting.WebPackage("ReplayType") = 251Testing软件测试网([H0@ FXF?
Browser("Browser").Page("Welcome: Mercury Tours").WebEdit("userName").Click 5,4, micRightBtn51Testing软件测试网dS"O!^e&xMg9U9^
f
Setting.WebPackage("ReplayType") = cur_replay_type51Testing软件测试网r5zz
Cp"HB$Q$e
't;h+f.f0s/fy"p?%Q0idx=4
2m6X7o(Z
b4u7v7Zow ]0Set WshShell = CreateObject("WScript.Shell")51Testing软件测试网8j]^&[bD
For i = 1 To idx51Testing软件测试网b"?
P:]#l8j[HSo
WshShell.sendKeys "{DOWN}"51Testing软件测试网"X.^X#`9l
Next51Testing软件测试网f/@2h:iS'N)nt
WshShell.sendKeys "{ENTER}"51Testing软件测试网eR;Z;NQ*hz
Set WshShell = nothing51Testing软件测试网#r#EU*e]2er}
51Testing软件测试网
h"l @J
R----------------------------------------------------------------------------------51Testing软件测试网uW#S?@#N
qO.XLI
51Testing软件测试网8}2Ug5kxGReplayType Number Indicates how mouse operations should be run. The value can be one of the following:
T)A)oK:Jq1Oor.FT-PI01 - Runs mouse operations using browser events.
.d l/Gb2Y02 - Runs mouse operations using the mouse.
`I K1mB]L
i!c0Usage:51Testing软件测试网Y@J MI2DI
Setting.WebPackage("ReplayType") = 251Testing软件测试网 q'Qs'Hr/Y@K
51Testing软件测试网'r/RN_ D8WM:y7~|{
7U9q2U[1l/R7V051Testing软件测试网7SL ~2y
RA"F*g 51Testing软件测试网_k@#ng;tDC
收藏
举报
TAG: