I'm trying to automate the launching of help from various places in my applications. My idea is to verify if the correct help content is being launched by verifying the Title of the help file that has been launched. But TestComplete does not seem to differentiate panes and texts in Help file. All it sees is the entire help screen as a single control. Has anyone come across with such a situation? What do you think the right approach should be?
Is TestComplete completely blind on a .chm file? If yes can we make use of the file’s source code (it displays the source on right click->View source) and verify if title tag <title>so and so</title> exists using a simple VB script?
Or is it a good idea to call a freeware tool from a test complete script that read a compressed file like a .chm?
Does going for a bitmap checkpoint for titles sound good? This would be my last choice, though.
If you have the Enterprise edition of TestComplete, you can get the name of the current topic using the Web Testing extension in the way mentioned by tonymro. You can use the LocationName property of the page object.
If you are working with the Standard edition of TestComplete, you can add the Internet Explorer_Server window class name to the list of the windows processed by the MSAA feature of TestComplete. In this case, you will be able to get the title of the current page using the following code:
[code=JScript]var pageTitle = Sys.Process("hh").Window("HH Parent", "*", 1).Window("HH Child", "", 1).Window("Shell Embedding", "", 1).Window("Shell DocObject View", "", 1).Pane("*").Caption;