| || |
illogical window names and the gui map
User Ed (firstname.lastname@example.org) posted:
I have an window in my application that uses an order number and
customer name as it's caption. the purpose of my test is to create
many orders for many different customers. The order number and
customer will never be the same for each run of the script and the
window caption will never be the same.
I know that this goes against the Microsoft coding standards, but the
change al the window captions in the application would require
massive code changes, rebuilds and documentation rewrites.
Is there any way at all to get this window into the gui map? I can't
set the label to "!.*" in the gui map editor, right? If I do that,
it will find whatever window is active.
Maybe I just don't understand the point of the gui map. WinRunner
can't work with a window unless it's in the gui map. The gui map
requires distinct window captions, so if the window caption
completely changes then Winrunner will not be able to find the
Why isn't there a function that allows me to find a window by it's
caption and activate it without having to put it into the gui map?
Maybe I have to go back to Visual Test...
Re: illogical window names and the gui map
User Richard Weber (email@example.com) posted:
Is there any part of the window caption that remains the same? If so just
use a reg expression with that part of the caption. If not, then you could
use the Win32 API to get the handle of the active window (this should be the
window you want just after it has opened) then add the handle to that
window's GUI entry, remove the label as a property. Now that window can be