Contributions
The same old WPF problem
I've seen this question posted in other forums but no satisfactory answer was given We have several systems with TestComplete 7.52 installed. On one system we can "see into" WPF desktop applications and drill down into some of the visual components. On others. the only thing that can be seen is the MainWindow. On this machine, the WPF extensions and Open Application extensions have been loaded just like on the working machine. I can verify that in the project properties I see the WPF category and the framework elements listed. I have given names to controls in my application with no luck, Any attempt to create a keyword recording only records pixel positions in the main window. Any attempt to "map object from screen" can only see the MainWindow. If I try to map a simple WPF button on the main window using the cursor method the button cannot be highlighted and I get the message you see attached as an image What can be different between these machines? - Peter10KViews0likes2CommentsRe: Waiting for WPF Objects without WaitWPFObject
I have the same problem with waitChild in a Java App. It does not always wait. Looking at what is inside waitChild, it is just a loop checking for child and then waiting. My suspicion is that wait drops through because it has in fact found the window (perhaps its not completely populated) but then other objects on that window are not yet found. Strange thing is that sometimes, when I run the application once outside of test complete, it will then respond properly inside a playback script. -p1.6KViews0likes0CommentsPlayback very erratic on desktop application
My problem is similar to some others that have mentioned it relative to their web testing, but mine is a java swing application. When I playback a script often it repeatedly fails to recognize the very first window. Other times it will run without any problem. It is unrelated to what other applications are running on my system. The object browser shows the first window with exactly the same name and path (in my name map) as it is referred to in the script. Installing TC and tested app on another computer shows the same problem. The way I wait for the window to be ready after launching the application is this: function WaitForDesigner() { Sys["Process"]("java")["SwingObject"]["WaitChild"]("EditModalDialog", 30000) } Funny thing is is that it doesn't wait for 30 seconds, instead it waits 0 time and then moves ahead into the script reporting object after object not found. Other days it is fine. This is seriously disturbing our work with the product. - P12KViews0likes1CommentRe: About the brackets usage.
Am a novice userand have some questions relating to window object references.. 1. Is there a white paper or help topic that gives a complete description of the object reference syntax: brackets, parentheses and how they map to functions, function parameters, properties, property values and controls. 2. Is it legitimate to concatenate references together as in: var p = ["xxx"]["yyy"]("zzz"); waitSubChild(p) function waitSubChild(p) { var q; q = Aliases["mmm"][nnn] + p; Sys["Process"]("WINWORD")["WaitChild"](q, -1, 30000) } 3. Is there a wildcard symbol one can use in a window reference to indicate that one doesn't know how deep the heirarchy is. E.g. Sys["Process"]("WINWORD")["**"]["WinFormsObject"]("WAPDockableWindowDetailCaption", "Elements")["Visible"]1.3KViews0likes0Comments