Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checking Read only text box
#1
Solved: 10 Years, 9 Months, 1 Week ago
How can I check 'Read only fields' in the web applications?? I am testing the application in QTP 9.0.

Thanks
Priya
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
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)
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 10 Years, 9 Months, 1 Week ago
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
Reply
#4
Solved: 10 Years, 9 Months, 1 Week ago
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.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#5
Solved: 10 Years, 9 Months, 1 Week ago
Hi I think there is some RO Property named "Locked" please do check if this property is Available
Reply
#6
Solved: 10 Years, 9 Months, 1 Week ago
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
Reply
#7
Solved: 10 Years, 9 Months, 1 Week ago
Hi,

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,172 07-10-2017, 04:20 PM
Last Post: rajeevk7
  How can we get the Windows application Text box background color Using UFT 11.53 Kuppampattu 3 5,674 06-06-2017, 11:12 AM
Last Post: workrohit08
  Need to Validate Text filed is blank after clicking on the Text box balak89 3 4,549 09-13-2015, 12:06 AM
Last Post: ADITI1992
  I am trying to extract text from a webelement but it is generating blank text scenari excellentpawan 2 4,293 08-13-2013, 08:37 PM
Last Post: excellentpawan
  spell checking of web objects kriday 3 3,780 07-05-2013, 01:37 PM
Last Post: Staff

Forum Jump:


Users browsing this thread: 1 Guest(s)