[ 本帖最后由 hsjzfling 于 2008-3-4 18:59 编辑 ]作者: hsjzfling 时间: 2008-3-4 17:21
貌似我2楼说的有点问题,编辑下~~作者: beiyu95 时间: 2008-3-4 17:28
给个官方的说明:
In addition to learning the mandatory and assistive properties specified in the Object Identification dialog box (Tools > Object Identification), QuickTest can also learn a backup ordinal identifier for each test object. The ordinal identifier assigns the object a numerical value that indicates its order relative to other objects with an otherwise identical description (objects that have the same values for all properties specified in the mandatory and assistive property lists). This ordered value enables QuickTest to create a unique description when the mandatory and assistive properties are not sufficient to do so.
Because the assigned ordinal property value is a relative value and is accurate only in relation to the other objects displayed when QuickTest learns an object, changes in the layout or composition of your application page or screen could cause this value to change, even though the object itself has not changed in any way. For this reason, QuickTest learns a value for this backup ordinal identifier only when it cannot create a unique description using all available mandatory and assistive properties.
In addition, even if QuickTest learns an ordinal identifier, it will use it during the run session only if the learned description and the Smart Identification mechanism are not sufficient to identify the object in your application. If QuickTest can use other test object properties to identify the object during a run session, the ordinal identifier is ignored.作者: 隐形人 时间: 2008-3-5 18:26
整理下楼上所有同志的观点:
to hsjxfling:依据你的观点,我可以把所有的属性全都定义在mandatory properties,因为mandatory properties是首先的属性,你并没有说明某些属性不能放在mandatory properties是情况.别外,依据beiyu95提供的官方文档,你的顺序可能要重新排一下:mandatory properties->assistive properties -->Smart Identification ->ordinal identifier
(原文:In addition, even if QuickTest learns an ordinal identifier, it will use it during the run session only if the learned description and the Smart Identification mechanism are not sufficient to identify the object in your application.)
谢谢大家的回复~~~作者: hanxing0304 时间: 2009-5-1 16:36
QuickTest has a predefined set of properties that it learns for each test
object. If these mandatory property values are not sufficient to uniquely
identify an object you record or add, QuickTest can add some assistive
properties and/or an ordinal identifier to create a unique description.
Mandatory properties are properties that QuickTest always learns for a
particular test object class. Assistive properties are properties that QuickTest learns only if the
mandatory properties that QuickTest learns for a particular object in your
application are not sufficient to create a unique description. If several
assistive properties are defined for an object class, then QuickTest learns one
assistive property at a time, and stops as soon as it creates a unique
description for the object. If QuickTest does learn assistive properties, those
properties are added to the test object description.
Note: If the combination of all defined mandatory and assistive properties is
not sufficient to create a unique test object description, QuickTest also
learns the value for the selected ordinal identifier.
When you run a test, QuickTest searches for the object that matches the
description it learned (without the ordinal identifier). If it cannot find any
object that matches the description, or if it finds more than one object that
matches, QuickTest uses the Smart Identification mechanism (if enabled) to
identify the object. In many cases, a Smart Identification definition can help
QuickTest identify an object, if it is present, even when the learned
description fails due to changes in one or more property values. The test
object description is used together with the ordinal identifier only in cases
where the Smart Identification mechanism does not succeed in narrowing
down the object candidates to a single object.
You use the Object Identification dialog box (Tools > Object Identification)
to configure the mandatory, assistive, and ordinal identifier properties that
QuickTest uses to learn descriptions of the objects in your application, and
to enable and configure the Smart Identification mechanism.
The Object Identification dialog box also enables you to configure new
user-defined classes and map them to an existing test object class so that
QuickTest can recognize objects from your user-defined classes when you
run your test.