With UFT, it is very straightforward to access identification properties using GetROProperty
and CheckProperty
. However, this limits the scope of what can be checked, as TOs bring many properties that may be required. Fortunately, at least in web applications, we can also use native properties for object identification. In this recipe, we will demonstrate this feature using adapted examples from the previous recipes.
We will identify the input query WebEdit
object using a Description
object. In Action
, we will put the following code:
Set desc=Description.Create desc("attribute/nodeName").value="INPUT|input" desc("attribute/nodeName").RegularExpression = true desc("attribute/name").value="q" set oQuery=Browser("title:=Google").Page("title:=Google").WebEdit(desc) With oQuery If .exist(0) Then .highlight End If End With...