Forum Discussion
Hi,
> My tested application is displayed in object tree as a black window.
Can you post a screenshot that demonstrates the problem?
I have added a screenshot that illustrates the problem.
- tristaanogre6 years agoEsteemed Contributor
What you're experiencing is correct... when TestComplete is in the foreground and your application is behind it, TestComplete cannot get an "image" of your control so it shows up black. When you move your application to the foreground, sure it shows up, but now TestComplete does not have focus so the Object Browser doesn't refresh.
If you were using two monitors and had TestComplete in one monitor and your application in another, this will work.
Truthfully, the image in the Object Browser has no functional effect on your tests. It's simply there to allow you to be able to visually verify the componet.- Adam16 years agoOccasional Contributor
Thanks for your reply. However, my application is in the foreground, but testcomplete is still waiting till the window is activated and/or the window is overlapped, and is unable to click on the windowbutton. I tried this with two monitors, also tried to activate the window, but without success.
My code:
var p, w; p = Sys["Process"]("rsoft_scl_install", 4); w = p["Window"]("TWizardForm", "Setup - Synopsys Photonic Solutions Licensing Version 2018.12", 1);
w["Click"](320, 370); //click somewhere on the window, works
nextButton = w["Window"]("TNewButton", "&Next >", 1);
nextButton["Click"](); //does not work- tristaanogre6 years agoEsteemed Contributor
That is not related to it showing as "black". What you've described is a windows recognition error. The object in question (the Next button) is not available to be clicked on. Something needs to be done better in identifying your objects in your code so that you can properly wait for them.
I see that the process has an index of "4". That's pretty strange. Here's my guess.... that because there are multiple processes for the install shield, that the windows are "jumping". The index on a process is not "static". It will shift and change, in my experience. So, while you are starting your code with the process with index 4, when you get to where the button is, that process may no longer be the one that has focus on the screen.
I would look into using "WaitWindow" for identifying the button... make sure that it is present and available for clicking. But, generally, that's your problem. Has nothing to do with it being "black" in the object browser.
I would also look into utilizing NameMapping. As I indicate above, you're using a pretty old methodolgy for defining your process and your windows. NameMapping has some better recognition features, some abilities to do a more refined object identification, and has some built in "wait" functionality for timing issues.
Related Content
Recent Discussions
- 6 hours agoSvetaG