Forum Discussion

zdanov's avatar
zdanov
Contributor
7 years ago
Solved

how to handle "member not found" runtime exception error

Hello, I'm testing my web app in Chrome, and this particular module is a Search form with a lot of filters (text boxes, drop-down lists, auto-complete fields, etc). TestComplete stores and read thes...
  • tristaanogre's avatar
    tristaanogre
    7 years ago

    zdanov wrote:

     

    I did not modify identification/mapping criteria; just left the defaults as TC captured it during test recording.


    Just as a note...  while TC does a decent job of automatically mapping items, as you have experienced, it's not perfect.  I rarely, if ever, keep the default mapping TC supplies me for the very same reason that you have experienced.

     

    I'm looking at your components and yes, definitely, you need to remap these things.

     

    First of all, in Tools | Options | Engines | NameMapping turn off the option for use extended find when possible.  Having this automatically turned on can cause issues in situations like yours where there are a LOT of objects that are very similar with minimal distinguishing characteristics.

     

    Secondly... it's obvious that the controls you're using are in some way custom controls... the fact that you have a dropdown list that TestComplete recognizes simply as a textbox means that this is a bit complicated.  You're going to have to do some digging around.  one thing I'd STRONGLY recommend is go back to your developers and see if they can help you out by applying unique identifiers to the objects.  Textbox(0) and Textbox(6) are very ambiguous.  

     

    Unfortunately, this is effort that will take a LOT of work to do via web forums.  But your first step is to go back and manually edit all your objects in NameMapping, removing the Extended Find where you can and inserting parent objects, etc.  NameMapping uses two sets of criteria for identifying an object.   It looks first at the hierarchy... Starting with NameMapping.Sys, it works it's way down the tree of objects to find the specific one.  Then it uses the properties to identify specific objects.  So, the more specific you can be with hierarchy and the more specific you can be with properties, the less likely you'll have the issues you're experiencing.  This will take time, but in the end it's worth it.