Micro Focus QTP (UFT) Forums
how to check checkbox's readonly property if developer has not used this property - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: how to check checkbox's readonly property if developer has not used this property (/Thread-how-to-check-checkbox-s-readonly-property-if-developer-has-not-used-this-property)



how to check checkbox's readonly property if developer has not used this property - blanchedsouza - 05-15-2008

In my application, if checkbox 1 is selected then checkbox 2 becomes readonly. Intially implementation was also done in same way.

but due to technical issues, now developer is using javascript.

If checkbox 1 is selected then, for checkbox 2 "Onclick" he returns "False".

I tried using following function:

Code:
a = Browser("abc").Page("abc").Frame("xyz").checkbox("yy").Object.onclick
but from QTP, I am getting whole function (multiline value) for variable "a"

Could you please suggest me any other way I can check whether checkbox is readonly or disabled.
As per current implementation, whether checkbox 2 is disabled or not, it returns "False"/0 for properties "disabled" and "readOnly" using GetROProperty function.

Thanks,
Blanche