Micro Focus QTP (UFT) Forums
Need to know how to determine a field is enterable - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Need to know how to determine a field is enterable (/Thread-Need-to-know-how-to-determine-a-field-is-enterable)



Need to know how to determine a field is enterable - tnt321 - 03-24-2011

Could you please show me how to determine if a field is enterable or updateable. I'm using QTP v10 for an Oracle application.

I want to check if the field is enterable so that I enter some inf otherwise skip that field. I have this piece of code, but it does not work correctly, because the field is enable (the cursor can go there) but it's protected from updating by the application.

Code:
If OracleFormWindow("XXXX").OracleTextField("YYYYYY").GetROProperty("enabled") = True Then
   OracleFormWindow("XXXX").OracleTextField("YYYYYY").Enter "ABC"
End If

Any suggestion is greatly appreciated.
Thanks.


RE: Need to know how to determine a field is enterable - tdevick - 03-24-2011

There is an object attribute named "isContentEditable" that you might try using. Something like this:

Code:
If OracleFormWindow("XXXX").OracleTextField("YYYYYY").Object.IsContentEditable Then
    OracleFormWindow("XXXX").OracleTextField("YYYYYY").Enter "ABC"
End If



RE: Need to know how to determine a field is enterable - tnt321 - 03-24-2011

I tried the suggestion but got the error "Object does not support this property or method". I suspect this property does not belong to the OracleTextField object.
Am I missing anything?
I'm a beginer with VB script. If no property/method avaible, any idea to work around.

Thanks.