Forum Discussion

tinauser's avatar
tinauser
Frequent Contributor
14 years ago

testing VB open application

hi there,

I have two questions over testing a VB application.



1)

I want to test elements of a status bar, which I can see in the object explorer as a WndClass StatusBar 20WndClass.Among the extended properties there is a promising wPartCounts which is equal to 5 (although the status bar is actually divided in 4...) and a wText properties; unfortunately whatever index I give (from 0 to 5), it does not return any string.



2)

The application can generate an HTML previewer, which is a class ThunderRT6FormDC. I need to test the loaded html, but I can not find it in the object explorer. Among the ThunderRT6FormDC children there is a Internet Explorer_Server class, but I would not know how to test it.



Any ideas is welcome.

3 Replies

  • Hi Lorenzo,



    I want to test elements of a status bar, which I can see in the object explorer as a WndClass StatusBar 20WndClass.Among the extended properties there is a promising wPartCounts which is equal to 5 (although the status bar is actually divided in 4...) and a wText properties; unfortunately whatever index I give (from 0 to 5), it does not return any string.


    I recommend that you try using approaches provided in the Ways to Interact With Application Objects help topic - this can help you get the information you need from the status bar. 





    The application can generate an HTML previewer, which is a class ThunderRT6FormDC. I need to test the loaded html, but I can not find it in the object explorer. Among the ThunderRT6FormDC children there is a Internet Explorer_Server class, but I would not know how to test it.


    An embedded web browser is actually an IE instance inserted into your application. So, you should be able to interact with it via the Web Testing plug-in. Note, however, that the plug-in is only available in the Enterprise edition of TestComplete and is not available in the Standard edition.
  • tinauser's avatar
    tinauser
    Frequent Contributor
    Hi Allen,

    Thanks for replying.



    Regarding answer 1, there are several methods suggested, I tried to map the status bar in the the object mapping as win32 status bar, but still can not get the  text. Which of the suggested method is the most general and likely to succeed, given the fact that the application is an open VB one?



    Regarding the answer 2, is it not possible to test such an html preview without the web plugin ? For instance, if I right-click on the preview I get the window-right-click-menu and I can see where the html is temporary saved, and I could read the html as a normal text file; this should be functional (although not optimal), but I can not get the path in the from the right click window menu: is that possible?



    Thanks

  • Hi Lorenzo,







    Which of the suggested method is the most general and likely to succeed, given the fact that the application is an open VB one?



    The first thing to try is methods/properties/fields of the corresponding control. Examine them thoroughly - there is a chance that you'll find what you need, although from my experience it is not always possible to obtain status bar text this way. The second thing to try is Text Recognition and MSAA. 







    is it not possible to test such an html preview without the web plugin ? For instance, if I right-click on the preview I get the window-right-click-menu and I can see where the html is temporary saved, and I could read the html as a normal text file; this should be functional (although not optimal), but I can not get the path in the from the right click window menu: is that possible?



    Without the Web Testing plug-in, you can only work with web pages in black-box mode. That is, you'll only get coordinate clicks and keystrokes. As for getting the corresponding markup, you should be able to get the page's source unless the context menu is blocked in the embedded browser. Simulate a right click and select the "View source" context menu option - this will open the source in an editor and you'll be able to access it. Also, it's possible that you'll be able to get the markup via the web browser control's methods/properties available in the Object Browser.