Forum Discussion

LAB's avatar
LAB
Contributor
6 years ago
Solved

A tale of two popups

Running a keyword test here, am wondering if it's possible to solve this without code.   I'm dealing with two popup windows on our website, one is start date, the other is end date. Both pop ups vi...
  • AlexKaras's avatar
    6 years ago

    Hi,

     

    Unless I missed something in your question... It is my understanding that both cdk-overlay-* popups exist on the page (thus causing objects ambiguity recognition) but only one of them is visible at the given moment of time. If the above is correct, does it help if additional Visible=True identification property is added to NameMapping?

    (In the case if both cdk-overlay-* elements have Visible property set to true or false, you may consider to use Required Child functionality of NameMapping.)

  • tristaanogre's avatar
    6 years ago

    It has to do with caching of mapped object, I believe. To improve performance, TestComplete caches a mapped object so that, if it is used more than once in the same test case, it doesn't have to be "found" again.  So, what is probably happening is that the first time it is used, it gets the handle for the "start date" generated object and caches that.  When you click the button for end date, it tries to use the cached value and probably gets lost in the process.  A potential solution to this, if you're using the same mapped object more than once in a test case and there is a potential for it to be destroyed, recreated, reconfigure, etc., to call "RefreshMappingInfo" on that object before you try using it the second time.