|
原帖由 yabest 于 2007-6-16 16:16 发表
晕了晕了,在我的印象里,我到过的论坛里,见过的帖子里,描述性编程都是指“不用对象仓库,直接用脚本描述对象”的。
怎么突然“描述性编程”变成是“手工写脚本”了,是跟“录制脚本”相区别的了?
...
sdlkfj1 不好意思,是我理解错了。刚刚查了一下QTP帮助,补了一点儿钙。
描述性编程的确是利用对象属性识别对象而非对象仓库保存对象。在QTP的帮助里面有几段说明:
Such a programmatic description can be very useful if you want to perform an operation on an object that is not stored in the object repository. You can also use programmatic descriptions in order to perform the same operation on several objects with certain identical properties, or in order to perform an operation on an object whose properties match a description that you determine dynamically during the run session.
[描述性编程可以用于识别对象仓库中未保存的对象,识别某个属性相同的几个对象,或者识别属性值在运行过程中动态决定的对象。]
There are two types of programmatic descriptions. You can either list the set of properties and values that describe the object directly in a test statement, or you can add a collection of properties and values to a Description object, and then enter the Description object name in the statement.
[编程式描述有两种,一种是在测试语句中使用对象的属性和属性值对,另外一种是把属性和属性值集合加入一个Description类型的对象然后在测试语句中使用这个对象。]
[ 本帖最后由 winfood 于 2007-6-16 16:48 编辑 ] |
|