Why does SilkTest generate a different tag for the same object by using "Record Window Declarations" or by using "Record Testcase or Action"?
"Record window declarations" does not use the same recorder as Record Action or testcase. Usually the SilkTest recorder attempts to associate a window with an existing window declaration by matching only the caption.
If no window declaration is found that has a matching caption, then the recorder will dynamically generate a new window declaration for that window.
If a window does not have a caption, or if several windows of the same class have the same caption, then you should use the window ID form of the tag instead of the caption. To get the Record Window Identifiers and Record Actions recorders to recognize that window declaration, you must add the following line to the window declaration in question (.inc file):
[-] window BrowserChild WelcomeToGreenMountainOutp [ ] //multitag //"Welcome to Green Mountain Outpost" [ ] tag "$http:??gmo.demo.com?" [ ] setting bExactMatch = FALSE
That setting tells the recorder to use an existing window identifier for the window as long as the tag statement matches that window"s declaration, even if the captions do not match.