Micro Focus QTP (UFT) Forums
Checking Read only text box - 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: Checking Read only text box (/Thread-Checking-Read-only-text-box)



Checking Read only text box - Priya Shah - 05-23-2009

How can I check 'Read only fields' in the web applications?? I am testing the application in QTP 9.0.

Thanks
Priya


RE: Checking Read only text box - Ankur - 05-23-2009

Though the questions is not much detailed but what I can make out is, use ChidObjects to get all the objects of particular type. Then inside loop check which of them is "read only" (you will get the property using Spy)


RE: Checking Read only text box - Priya Shah - 05-23-2009

Hi Ankur thatnks for the reply.
I will explain the question in detail -

I am working on validation of web application, so it has one field which is read only, i.e user can not write in to it. So, I am having a testcase to check whether it is read only or not. Like If I am giving some input then it should not be written in to it. How can I check this is QTP??

Thanks
Priya


RE: Checking Read only text box - Ankur - 05-23-2009

oh..ok.. if there is only one field, then it got much easier (from the solution I suggested above)... Simply "Obect Spy" on the field and find out which property has "read only" attribute. Using GetRoProperty get the value at run time.


RE: Checking Read only text box - manojith1984 - 05-27-2009

Hi I think there is some RO Property named "Locked" please do check if this property is Available


RE: Checking Read only text box - stephenlb4u - 05-28-2009

Hi Priya,

Use the below script to check the text box property

Code:
Browser("BrowserName").Page("PageName").Frame("FrameName").WebEdit("TextBoxName").GetROProperty("disabled",1)=false
The above script check whether the textbox is enabled...likewise u can change the true or false condition is check enabled and disabled..

Stephen


RE: Checking Read only text box - Tarik Sheth - 05-28-2009

Hi,

Readonly property will have the value as '0' which will be disabled in the UI.