我的地盘我做主! 博客:http://tester2test.cnblogs.com/   msn:win_soft@163.com

QTP总结〔转载〕

上一篇 / 下一篇  2007-12-04 22:07:29 / 个人分类:其他

QTP总结51Testing软件测试网 X a;Tzf
51Testing软件测试网-Qo8g(~BJt1H#Uc

作者:万全之测51Testing软件测试网;iL"v3e VQ*?
51Testing软件测试网%p)oC"EM D
QTP
的基本使用函数:
51Testing软件测试网5`3m)Y(f#r"F

1, 获取对话框相应的文字: GetVisible Text

8P/Pz#^'WA0

2, 查找相应的字符串: instr (1,查找目标字符串,所查找的字符串)51Testing软件测试网p] E`C0L/f

3, 随机数的获取: Randomnumber.Value() 或cstr(int(Rnd*10)+1)51Testing软件测试网0Di)QV5Hf2xG

4, 等待函数: Wait(秒数)

waO|~:V0

5, 获取数组下标: UBound (数组名)

nwbaf%U0

6, 拆分数组: Split(MyString, ",", -1, 1)51Testing软件测试网,UN(RUd i%T

7, 可执行步骤: OptionalStep51Testing软件测试网7R Ct5d*yj!co

8, 报告信息: Reporter.ReportEvent 3, "Save Step", "Out of cycle!"51Testing软件测试网#m9O0M9?w)]

9, 判断对话框是否存在: .exist51Testing软件测试网4] Sz@C{Kp8{

10,事件过滤函数:Reporter.Filter=过滤条件(0123)0代表显示所有的errorwarning,1,显示error,2,显示waining,3,任何errorwarning都不显示。

PY'iK;PhV2^V0

11,循环函数:do … loop untilfor…to… then next,while.51Testing软件测试网K5U{ Co#r`

12,数据表格:DataTable,向外赋值,Dim aa = DataTable.value(“CellingName”,”ActionName”).

en)d{$Zr9C+W0

13,获得对象属性的三种方法GetTOPropertyGetTOProperties,GetROProperty,GetTOProperty获得程序中对象当前的属性,GetTOProperties获得当前属性所有集合,GetROProperty获得的是录制时对象所获得的属性。

!R];K&Z8PqF,f0

14,检查点方法check和输出指定属性值output

%EG2gho|0

15,函数Description,可以获得某页面同标签的属性进行操作。

7I%}3I8zXBl0

16,函数nagative可以随便跳转页面到指定的URL

cN.@ i u~t"U0

17,函数Object可以获得当前页面同属性的控件。

#V+g~-["[-D~)Vs0

18,函数Focus可以让控件获得焦点,函数Blur则是失去焦点,click单击,dbclick双击。51Testing软件测试网 pN0P gC:H'd*|

19,函数setAttribute可以设置控件属性,getAttribute可以获得属性。

ZJu5c |e[0

添加数据:

xC,~2J K ]}9d&Y,T|0

1.        在每个要覆盖的域添加checkpoint51Testing软件测试网 QGb2C+gV.{9e

2.        在不能同名的必填字段里,添加随机函数,循环增加。51Testing软件测试网E3hf%aB't U*I;Q1K

查询数据:51Testing软件测试网9O5G8]v@

1.       先添加数据,再查询数据更新,更新成功时设置checkpoint51Testing软件测试网f!R1tvG'U]@X

2.         最后删除成功时设置checkpoint

3A2Q?yp k7BDL0
2T6Q(x*pw'd'J/|;k051Testing软件测试网 c1`6^ E8ioOO
测试者家园 2007-10-08 12:06 发表评论

c0Ovc,W0
W{*A~_g0Link URL: http://www.cnblogs.com/tester2test/archive/2007/10/08/916843.html

TAG:

 

评分:0

我来说两句

Open Toolbar