Forum Discussion
A clue! A clue! (forgive the retro children's show reference)
If your test will proceed from there correctly, then it's likely you have a timing issue. The test is moving faster than the object is loading so it is Not Found when the test goes but when you click and keep it running it's Found.
There are some different ways to go to fix this.
1) You can put a Delay right before the line that gets the object not found message. This is a quick fix but you have to guess at how long to wait, just long enough but not so long that it delays your whole test. Usually 5000 or 10000 will fix it but it's not very precise.
2) If you know that the object in question should always show up, then use some variation of WaitChild to wait for the object to show up before you try to do anything with it.
If you find that this is happening to you in many places in your tests, then considering slowing down the time between events in your project settings. This will slow the whole test down some, but it is more efficient than trying to change it every where in the code.
Another possibility in addition to Marsha_R's suggestion of timing is that, if the components within the iframe in question are similar in properties to items in the other iframes, you may be dealing with a problem of object identification. It could be that you have properties in your mapping that could map to multiple possible objects.
Question: Do you have the iframes themselves mapped? While you might not be interacting with that object, you may need to map them in the hierarchy in order to better identify the components you ARE working with. You don't need to include the iframes in your Alias structure, but if you include them in the NameMapping itself, that might resolve the problem by providing an additional vector for identification
- AlexKaras9 years agoCommunity Hero
Hi Apple,
One more question: are you using Tree or DOM model in your project? In case of latter, http://support.smartbear.com/testcomplete/docs/app-testing/web/general/object-identification/dom-model.html might appear to be useful.
- roytberA9 years agoOccasional Contributor
Thank you all for your help, I finally solved that issue by Ignore unexpected window and Ignore overlapping window in Playback. Now everything seems to works fine.
Thank again!