Forum Discussion

chad's avatar
chad
Occasional Contributor
14 years ago

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

  • chad's avatar
    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.
  • chad's avatar
    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.