Unified Functional Testing Practitioners Forum

"Visible Property" of OR in QTP11.x is not working as expected.

Valued Contributor.

"Visible Property" of OR in QTP11.x is not working as expected.

Hi Team, 


I am testing a webpage, and want your help to understand the existence of "Visible" test object property of QTP? does it talks with DOM of Html webpage? 

Let me write down the problem here: 


I have two RadiobuttonGroup as below:
  - RadiobuttonGroup01 (name=Radio54Action, id = Radio54Action)

  - RadiobuttonGroup02 (name=Radio53Action, id = Radio53Action)

On selection of a dropdown, page get refreshed and make the RadiobuttonGroup Visible alternatively. Point to note that second Radiobutton does exist in the page but it is hidden. 

As per Application flows, both of the radio button have same functionality and values, so we don't want to keep two separate Objects in the repository.


Hence I have added the “Description Property” for the recorded object as below:



 Visible = true, id = Radio(54|53)Action   (used RegularExpression).




But this setting is giving me an error saying that QTP is able to find duplicate controls in the page. What I believed that after using “visible” property this error should not occur as QTP should Identify only that object which is visible to user and matching the ID Property.



What’s the use of visible property in above case?

Is there any other way through which we can distinguish the controls which is enable and disabled from ObjectRepository itself?


Note: I checked this functionality in UFT11.52, and I was amazed that visible property is working fine as expected, kudos to developer. But do we have any workaround in QTP11.0? As in my project we are using both QTP11.0 and UFT11.52.



Anand Kumar

Super Contributor.

Re: "Visible Property" of OR in QTP11.x is not working as expected.

I think first you can check the value of visible property for the first one(hidden one), even if you can not see the object, the value may still be true because they can hide its parent object, which will make all the child objects not visible. 


And also you can ask the developer what technology they are using to control the visibility, visible property or something else?



If my post helps to resolve your issue or query, please accept this as solution and give KUDOS on this page.



Valued Contributor.

Re: "Visible Property" of OR in QTP11.x is not working as expected.

hi Jeffery,


Thanks for your comments.


It is to let you know that this is a Webapplication.


As i told that it is a RadiobuttonGroup, hence visible property is not defined in "input" tag, but it is defined in its Parent tag which is nothing but a "DIV" (Which i believe a very common process of development).


Question is again same here, that "visible" property is QTP defined property which should work on webradiobuttongroup if

it's nearest parentElement is getting hidden/visible. I checked this thing in UFT11.52 and it is working fine, but the same OR is not working in QTP11.0. hence any solutions for that?