Forum Discussion
The 'Object Browser' shows everything but doesn't necessarily mean it is referenced properly in the test. Are you using 'Name Mapping'? If so, are you using 'Extended Find'.
If the failure occurring for the first object after opening the page try using the 'Wait' on the alias to ensure the page is fully loaded. If not, and there dynamic object loading, use the 'WaitAliasChild' to ensure the object is fully rendered before referencing the object. It is odd it previously worked. I would suspect there has been a change to page.
- quanuh10 years agoOccasional Contributor
william_roe thank for your reply
In our case, we will find the object after it is created, for example a new item is added to the category. So I think that using Name Mapping is not a good choice in this situation. Curently, we are going to find the object by its properties. As mention in the main topic, the failure is about 30% mean that 70% this object is found in the same test. The issue may be the object is not fully loaded in some cases, so in case the page is fully loaded I will try the 'WaitChild' and keep posted.
Thanks,
- tristaanogre10 years agoEsteemed Contributor
IIRC, didn't Microsoft change the architecture of IE starting with IE 9 where it would potentially spawn additional iexplore processes depending upon resource need? So, you may have initially a sys.process('iexplore') that some of your page stuff is associated with but, occasionally, there would be a sys.process('iexplore', 2) or even a 3 depending upon number of tabs open, apps running, etc.
Check your object browser when you run into your problem and see if you have multiple processes. If so, I believe, somewhere, there's a way to turn that off in your test environment so that iexplore will only ever give you one process so long as you don't actually open another browser window.
- quanuh10 years agoOccasional Contributor
tristaanogre thank for your reply
Our testing environment is running with IE multiple process, may be disable LCIE is your suggestion. Unfortunately, our testing is requires IE multiple process. We got no problem with the IE process, the test work well before. After more investigating, I have found that the issue occurs when the object is not fully loaded (just happened about 6 months ago). I have tried 'WaitChild' with the object name (ex. sys.process('iexplore', 2).WaitChild('Panel("myGrid")',10000)) but it always returns an empty object, in the same case, Find method work well with the same object (ex. sys.process('iexplore', 2).Find("Name",'Panel("myGrid")')) return object with name Panel("myGrid").
Could anyone help me, What's wrong with my WaitChild method?