Forum Discussion
So it's a multiple document interface having a number of windows, and you are closing each window if they are opened i.e. Visible Equals True?
I'm assuming you are using a wild card for the name mapping of Aliases.IC.MDIForm1.MdiClient.ChartForm?
When the last window is closed, what is the value of Aliases.IC.MDIForm1.MdiClient.ChartForm.Exists?
well thats the mysterious bit. obviously, i couldn't access the ChartForm when they all are closed. dont know how it does it, but using exists property does work when compared to using visible. or visibelOnScreen.
- rraghvani29 days ago
Champion Level 3
An Object holds property values that you can access and check. But if the Object itself is null or undefined, it no longer exists in memory, so you cannot access its properties.
Once these three items have been removed, you can no longer access the Visible property, as the Object no longer exists.Almost all modern programming languages behave like this.
- Hassan_Ballan29 days ago
Champion Level 3
An object must exist before its properties can be checked. Because of this, your while loop should first verify Exists = True.
Since you are checking for something that may not yet exist, TestComplete will, by default, wait according to the configured Default Auto-wait timeout (10 seconds) to allow the object to appear before timing out.
If you want the check to fail faster, you can use the custom timeouts feature to reduce the timeout for that specific operation—for example, lowering it to 1 second.
If this resolves your issue, please consider marking the answer as the solution so future readers can find it more easily.
- BD_Geoactive28 days agoContributor
thanks for the information