Forum Discussion
PropArray = new Array("ObjectType", "idStr", "ObjectIdentifier", "className"); ValuesArray = new Array("Textbox", "menuSearch", "menuSearch", "menuSearchReady"); // Find the cell where the link/button resides var textbox = AnyPage["Find"](PropArray, ValuesArray, 1000);
This didn't reliably replay, so we decided to drop the ObjectIdentifier & className.
PropArray = new Array("ObjectType", "idStr"); ValuesArray = new Array("Textbox", "menu-search-input"); // Find the cell where the link/button resides var textbox = AnyPage["Find"](PropArray, ValuesArray, 1000);
This didn't replay 100% of the time either... probably 95-98% of the time, but it was an improvement over the 85-90% we started with.
Try changing from FindChild to FindChildEx with an additional parameter for timeout (see my example above)
- tristaanogre8 years agoEsteemed Contributor
Note, also, that before I do anything with the object I'm searching for, I always check the "Exists" property... FindChild and FindChildEx will ALWAYS return an object with that property... if it doesn't find what you're looking for, that "stub" object has an Exists property with a value of "false" so this is an easy way to check if you found what you're looking for without TestComplete complaining about "Object not found" or "cannot call a method on undefined" or something like that.
- bo_roop8 years agoContributor
FindChildEx appears to be working fine... now to go send it off through our array of Virtual Machines to see if it's working better there too.
Thanks!
Hopefully we won't have to revisit this on Monday. :)
Related Content
- 6 years ago
- 8 years ago
Recent Discussions
- 7 hours ago
- 8 hours ago
- 14 hours ago