Forum Discussion
I'm not sure what version of TC you are using. Since WaitTime is 0, WaitAliasChild will return immediately. Assuming the child alias object exists, then the property Visible will return a value immediately too.
However, if the child alias object does not exist, WaitAliasChild will return a stub object immediately. Property Exists will return immediately, but Visible will return an error after a number of seconds - depending on the project auto-wait timeout.
Ideally, you should enclose your Visible property within an If statement
let ac = Aliases.ICS.WaitAliasChild("AddChannelWindwo", 0);
if (ac.Exists) {
let ac_vis = ac.Visible;
}
- cg-ngc3 months agoOccasional Contributor
WaitAliasChild does indeed always return immediately.
Your statement "Property Exists will return immediately" is, however, incorrect (At least in my case)
It will ONLY return immediately if the element is visible.
If it's invisible, it will wait for the default timeout
WRT the enclosing of an if statement - yeah, in production code, I would indeed do that. For the sample code, however, I KNEW whether it would return true or false, I just did it that way to keep the sample code shorter- rraghvani3 months agoChampion Level 3
Have you looked into https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/how-to/refresh-cache.html ?
- rraghvani3 months agoChampion Level 3
Using TC v15.55.53.7, here's a small example based on the website https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_visibility
It returns immediately
Related Content
- 4 months ago
- 2 years ago
Recent Discussions
- 19 hours ago