Highlighted
Established Member..
Established Member..
7716 views

Visual Relation Identifier Problem In Descriptive Programming

Visual Relation Identifier is great feature. However it's not well developed for to work with descriptive programming. In Object Repository There is facility to specify Left/Right, Bottom/Above,  Closest to X-Axis/Closest to Y-Axis/Closest to Both Axis/Contains.

 

So there are three option we can specify. But when it comes to DP, we have only two options RelativePosition, SetArgument.

 

I can only set whether the object is Left/Right/Bottom/Above/Closest to X-Axis/Closest to Y-Axis/Closest to Both Axis/Contains. But there is no facility to set multiple relations for the same related object.

 

Attached the scrren of application. I have to select a checkbox based on label. Object Repository way is working fine for the same.

 

Set rc = VisualRelations.Create
Set relation = rc.Add
relation.relatedobjectpath = "Browser(""micclass:=Browser"").Page(""micclass:=Page"").WebElement(""innertext:=Art"",""html tag:=LABEL"",""index:=0"")"
relation.relativeposition = micRelRight
relation.setargument micrelinline, True

Set des=Description.Create
des.Add "micclass","WebCheckBox"
des.Add "visual relations",rc

Browser("micclass:=Browser").Page("micclass:=Page").WebCheckbox(des).highlight
Set relation = Nothing
Set rc=Nothing

 For the above code i have also tried with below statements and no use. So my query is, is there any facility to specify multiple conditions for relativeposition property. If i add multiple values like specified below, the value is getting over writing.

Please confirm whether this is a limitation of QTP.

 

relation.relativeposition = micRelClosestX
relation.relativeposition = micRelRight
relation.relativeposition = micRelClosestX

Thanks,
Sudhakar Kakunuri
www.QtpSudhakar.com
Author - Cracking The QTP Interview Book published by TataMcGrawHill
0 Likes
7 Replies
Highlighted
Absent Member.
Absent Member.

Re: Visual Relation Identifier Problem In Descriptive Programming

Avoid low-level methods at all cost. In fact you don't need them.

------------------------------------------------------
QTP vs Robot vs Silk vs Selenium vs ...
Guess who won
0 Likes
Highlighted
Established Member..
Established Member..

Re: Visual Relation Identifier Problem In Descriptive Programming

I just want to check on that checkbox using the label. Does Visual Relation Identifier work for this type of situation in DP?

 

Low Level Methods?? Are you talking about "highlight". Even below statement is not working. 

 

Browser("micclass:=Browser").Page("micclass:=Page").WebCheckbox(des).Set "ON"

Thanks,
Sudhakar Kakunuri
www.QtpSudhakar.com
Author - Cracking The QTP Interview Book published by TataMcGrawHill
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Visual Relation Identifier Problem In Descriptive Programming

Of course not. If parent object uses Des Prog, childrens must also use Des Prog.
------------------------------------------------------
QTP vs Robot vs Silk vs Selenium vs ...
Guess who won
0 Likes
Highlighted
Established Member..
Established Member..

Re: Visual Relation Identifier Problem In Descriptive Programming


@DaveTheTank wrote:
Of course not. If parent object uses Des Prog, childrens must also use Des Prog.

Mr.Dave, I have not mixed OR and DP. Please observe. des is the description object.

 

FYI

 

After some research we found that, if the relatedobjectpath is from Object Repository then the concept is working. And if the relatedobjectpath is in DP the Visual Relation Identifier concept is not working.

 

This is defenitly problem with QTP.

 

Expecting a solution from QTP

 

1) Descriptive Programming Path should be accepted for relatedobjectpath

2) relativeposition should accept multiple conditions like Left/Right, Bottom/Above, Closest to X-Axis/Closest to Y-Axis/Closest to Both Axis/Contains

 

Thnaks


Thanks,
Sudhakar Kakunuri
www.QtpSudhakar.com
Author - Cracking The QTP Interview Book published by TataMcGrawHill
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Visual Relation Identifier Problem In Descriptive Programming

Hi Sudhakar,

I am trying to identify an object using visual function identifier. I could set the relative object properties in QTP. But I am not sure how to refer my test object in descriptive programming. Can you please help.

Thanks,
Padma
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Visual Relation Identifier Problem In Descriptive Programming

Am quoting what has been defined in QTP help. Also see full description by searching "VisualRelation Object, RelatedObjectPath Property"

 

RelatedObjectPath Property

 

Description

 

The full object hierarchy path of the related object. For example:
"Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passFirst1")"

 

Important Information

 

The specified object must be an object from the test object repository. It cannot be a test object specified by a programmatic description.

 

 

thanks all

Nishanth

0 Likes
Highlighted

Re: Visual Relation Identifier Problem In Descriptive Programming

Hi Sudhakar,

Any solution for the limitaiton you found you are aware off - please let me know

Me as well expecting it to work and stuck for now in the same issue.

Thanks

Prakash

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.