Forum Discussion

Test56's avatar
Test56
Contributor
13 years ago

How to find if the Textbox is Read Only

I am trying to automate a test plan where i need to verify if a text box is read only or not. The Enabled property always returns true. Do we have any property/method through which we can find out if the text box is a read only or editable.



WndClass : Edit



I got one property where its mentioned about the Read only property , WndStyle but it returns a number which we cannot rely on. But if we click the eplipses button related to the WndStyle , we do see one more window (attached Screen shot) which tells us about ES_READONLY. While scripting can we retrive this value.
  • Hi Rajat,



    Try working with the WndStyles property using the code snippet from the last post in this thread.



    Note that the ES_READONLY constant is not defined in script languages by default, so you'll need to define it in your code using the 0x0800 hexadecimal constant.