Forum Discussion
I have added a screenshot that illustrates the problem.
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.
- AlexKaras6 years agoChampion Level 3
Hi,
In addition to Robert's reply:
> nextButton["Click"](); //does not work
What exactly does not work? Any error in test log? If yes, what is the text of the error message?
If there is no error in the test log, then do you see mouse pointer been hovered over the button during test run?
- Adam16 years agoOccasional Contributor
Thanks for your reply. You are right, there are 4 processes with the same name. But the window is always part of the process with index 4, I have checked.
I tried the waitwindow method, but that did not help. I have checked that the window is visible, also the next button is visible and enabled, but cannot be clicked. I got the following error message: “There was an attempt to perform an action at point (37, 11) which is transparent or out of the window bounds.” If the button is transparent, how do I know this and how can I workaround this?
I also noticed that testcomplete was waiting until the overlapped window became visible.
You said that I am using an old methodology for defining my process and windows. Is this a problem in this case? Can you tell me how long this methodology will be supported? Is it recommended to change this in my tests?
Thanks in advance
Related Content
Recent Discussions
- 6 hours agojstaehlin
- 24 hours agoAivanitskiy