Forum Discussion

romanmfs's avatar
romanmfs
Frequent Contributor
6 years ago

Can't remap the object

Hello, 

I am working with this page:

https://www.consolidatedcredit.org/housing/

I am clicking on "18004352261" (checkpoint)  and TC "thinks I am hitting "Search", so i go to my name mapping and try to remap some objects (for example "inner html, inner text, textcontent"..)

 

For some reason when I rename these and save them they instantely change back to wrong old value 'search", not phone number . Any recommendations?

 


  • romanmfs wrote:

    Hi, thanks for quick reply, 

    i am stil having issues, hope you can help me :)

     

    Here is the info:

    https://www.consolidatedcredit.org/housing/

    We are working with the number: 1-800-435-2261 on the header.

    Screenshots attached:

    (the properties of the phone number for some reason are for the "search" button no matter if I try to change them)

    Im not sure where is "advanced propery list"

     

    Those 3 screenshots are for "number" object

     

     

     


    Change the properties of the mapping of this object.  I'd remove the ObjectIdentifier and replace it with the "classname" which indicates it is a phone-number field.  As mentioned in my other response, because the two text nodes have the same index of "1", mapping is getting confused.

    When folks up here reference the need to make sure that the properties you use for identifying an object are "unique", this is what we mean... TextNode 1 is ambiguous... depending upon how the page is built, there could be any number of objects which, at some point in time, show up as "TextNode(1)" so you need to get more specific.

     

    Try the suggestions I made and hopefully this will help.

  • cunderw's avatar
    cunderw
    Community Hero

    It's not clear what you're using to map these objects as you're only showing some available properties. We need more detail about what's happening vs what you expect to happen. 

    • romanmfs's avatar
      romanmfs
      Frequent Contributor

      So, I am trying to setup a property check for that phone number on the page. 

      But TC maps the object as "search".

      So, what I am trying to do is just to remap it back to the phone number by changing some of the property values. 

      The 2 screenshots that I have added include all the values under that object.

       

      Let me know if I should take more screenshots.

       

      Thanks!

      • cunderw's avatar
        cunderw
        Community Hero

        So looking at the site myself, the phone number and search objects have different parents, and look like some properties could be dynamic, so just updating the single object probably won't get you where you need to be. You will have to do some investigating on how the parents are mapped first.

         

        Also, it sounds like you're using Test Complete to automatically map your objects. While this is great to get started and get an idea as to how your application is laid out, it will likely never be good on it's own.

         

        I would definitely recommend checking out all of the documentation under https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/index.html

         

        What you need to focus on is finding unique ways to identify all of you object, not just the furthest child you are wanting to interact with.