An object is learned inside a web page and is used as a template for another web page. For identifying the object, Visual Relation Identifiers properties are applied.
Trying to recognize the object in the second web application fails. The objects needs to be updated, then the description does not work on the first application.
Visual Relation Identifiers do not work if the following option is set:
Options -> Web -> Advance -> Learn and Run using automatic XPath identifiers.
This option is checked by default. The auto XPath is not visible by design since it is an automatically generated property.
There is an issue with VRI (Visual Relation Identifiers) in cases where a learned object is used as a ‘template’ and then the specific object is identified by changing the VRI setting (or the object indexer). Since the check for matching an element to XPath is done before VRI (or indexer), the web agent will always return the original element and the VRI settings will not match (or the indexer will be ignored).
To resolve this problem, disable XPath:
1. Go to Options -> Web -> Advance
2. Clear the Learn and Run using automatic XPath identifiers option.
For specifying a user defined XPath there is the XPath property that will override the automatically generated one. Add the _path property to the object in the Object Repository and leave it empty. This will rewrite the value in the options settings.
For documentation regarding auto XPath see:
• HP QuickTest Professional Add-ins Guide > Overview > Testing Web-Based Applications > Understanding Web Object Identifiers > Web Object Identifier Types
• HP QuickTest Professional Add-ins Guide > Overview > Testing Web-Based Applications > Understanding Web Object Identifiers > Considerations for Working with Web Object Identifiers