Forum Discussion

motorola's avatar
12 years ago

confused about mechanism of window naming

as I'm understanding things, you can use window naming to access a window like so:

Sys.Process("Shop").Window("WndClassName","Austreus Shop Management - Master Item")

is this correct?

I have several questions:

1. multiple windows may have identical window class name. So how does testcomplete know which window to call? in every application run, the window index and window class name may also change. the only thing that won't change is the window caption. I'm confused. Does this mean we have to edit window class name or index for every application run (not test run, but application run).

2. How do I determine the constant part of window class name so I can apply the wildcard

Thank you very much.

1 Reply

  • Anonymous's avatar


    You can refer the window only by its caption like this:

    Sys.Process("Shop").Window("*","Austreus Shop Management - Master Item")

    If the caption can be changed, you can specify only a constant part like this:

    Sys.Process("Shop").Window("*","Austreus Shop Management*")