Ask a Question

not able to get text(0) from msctls_statusbar32

chad
Occasional Contributor

not able to get text(0) from msctls_statusbar32

This should be relatively simple but I firmly believe the developers of AUT didn't quite complete the status bar text commit or something in the code.  Here is my situation:

I have a standard (msctls_statusbar32) status bar.  It has text in it giving some indication of where the user is in the application and what actions are happening.  I attempt to print it to the log it like this:

Log.message Aliases.Sys.MyApp.wndlpdrvr.Window("msctls_statusbar32", "", 1).wtext(0)



I get nothing, even though there is 1 item in that index and the status bar does have text.  What is odd I can set the wCaption property to what ever I want and I can then get the wText property just fine.  But in normal operation of the AUT it will not get any text at any time from that control.



Does anyone know what it is that might be prevening TestComplete from getting that property as it should?


.message ..LPDRVR.wndlpdrvr.Window("msctls_statusbar32", "", 1).wtext(0)I get nothing, even though there is 1 item in that index and the status bar does have text.  What is odd I can set the wCaption property to what ever I want and I can then get the wText property just fine.  But in normal operation of the AUT it will not get any text at any time from that control.Does anyone know what it is that might be prevening TestComplete from getting that property as it should?
3 REPLIES 3
chad
Occasional Contributor

Just to add something here.  I tried reading the same status bar control in IE and it worked just fine.  So it's definately someting unique with this application.


Hi Chad,





Probably, the control is owner-drawn. You can find information on such controls in the OWNERDRAW Controls Support help topic.





I can suggest that you try using the Text Recognition feature to get text of the control. Please find information on this feature in the Text Recognition Technology Support help topic.
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
chad
Occasional Contributor

BRILLIANT!  You just made my Friday.  I knew there had to be some sort of text recognition function in TC but it's not quite obvious how to get it.  Your link to enabling the text recognition was the key.  It works wonderful!  Thank you very much. 
cancel
Showing results for 
Search instead for 
Did you mean: