Forum Discussion

Dnyaneshwari's avatar
15 years ago

Default Name of Web Button Changes - Test Complete 7.52.678.7

Hello,



We are facing the following problem while automating a web application in Internet Explorer 8 (IE-8).

Frequently it is required to remap objects due to conflicts in the name mapping file. We follow the following steps to remap the object.



• Delete the existing node of the object from name mapping file

• Remap the same object with the default object name that Test Complete suggests



For objects like Web Buttons the default name changes every time a new instance of Internet Explorer is launched (Please refer the attached screen shots). Here the same button object have different Mapped Name in different instances of web browser (IE-8). Second browser is opened only after the first browser is closed. As a result of this phenomenon we have to change the Mapped Name from present default name to default name that was earlier used in the automation script which takes considerable effort and time.



At present we are using methods like find(), findAll(), FindAllChildren(), child() etc instead of Name Mapping for these objects which requires frequent remapping due to conflict in Name Mapping file. But use of these methods considerably reduces the performance of the Automation suit.



Is there any way other than this, that you could suggest, so that the default Mapped Name of objects remains the same and we could continue to use the existing Name Mapping file? In earlier communication with Automated QA it was suspected that our name mapping file is edited out of Test Complete and the file is partially corrupted



System Specification:

Test Complete 7.52.678.7

Win XP Service Pack 3



Regards

Dnyaneshwari

7 Replies

  • Hi,



    In this situation, there's no need to remap the object. You can just modify identification attributes for the current mapped object (you do this only once) so they are as follows:

    ObjectType = Button

    idStr = dijit_form_Button*

    ObjectIdentifier = dijit_form_Button*

    innerText = ?Add Resource Pool



    The asterisk makes TC ignore the variable part of a property value. You can find more information about this in the Using Wildcards help topic.
  • m1013864's avatar
    m1013864
    Occasional Contributor
    Our problem is not with the values of the properties but with the default names of the objects which is different every time. And as I have mentioned that we have to remap the object for reason:



    1. Test Compelete does not allow us to edit the property value as the name mapping file is partially corrupted (As doubted by Automated QA)
  • Hi,



    In this case, when you remap the object, specify the values from my previous post. After you have remapped the object this way, you can use the new mapped object whatever the values of idStr and ObjectIdentifier of the actual object end with.
  • m1013864's avatar
    m1013864
    Occasional Contributor
    This is our problem.



    We have to rename the default object name to the name that we have used earlier while writing the JScript unit in test complete (problem occurs when same script needs to be executed during regression; on remaping the object with the new default we have to again edit the writtin scripts). Since we have to frequently remap the objects at multiple places. It is taking enormous amount time with involved frustration.



    Can a web button when remapped at different instances of web browser give the same default name? Is there any way you can suggest so that we do not have to manually rename the default object name everytime, instead it uses the same name every time.



    example: dijit_web_button_43 always and not dijit_web_button_43 sometimes or dijit_web_button_50 the next time.



    We are not recording script instead writing Jscript units after mapping the objects.



    reason for remapping is written in the first post.
  • Hi,



    For objects like Web Buttons the default name changes every time a new instance of Internet Explorer is launched (Please refer the attached screen shots). Here the same button object have different Mapped Name in different instances of web browser (IE-8).


    TestComplete uses values of properties by which an actual object is mapped to identify it. In your case, for the first time, you had the following identification properties for the mapped object that corresponds to your button:

    ObjectType = Button

    idStr = dijit_form_Button_53

    ObjectIdentifier = dijit_form_Button_53

    innerText = ?Add Resource Pool



    When property values of your button change to:

    ObjectType = Button

    idStr = dijit_form_Button_78

    ObjectIdentifier = dijit_form_Button_78

    innerText = ?Add Resource Pool



    TC will fail to identify your button using the current set of the identification properties as your button now has different values for idStr and ObjectIdentifier. That's why, you had to remap your button, and TC gave it another name.



    Can a web button when remapped at different instances of web browser give the same default name?


    To avoid the issue, you need to follow the steps below:

    1. Delete the existing mapped object.

    2. Remap your button using the following set of identification properties:

    ObjectType = Button

    idStr = dijit_form_Button*

    ObjectIdentifier = dijit_form_Button*

    innerText = ?Add Resource Pool

    3. In the Aliases tree, give the object that corresponds to the mapped object the name that is currently used in your test.



    What this will give you is that you will not have to remap your button again.
  • Hi,

    I ´m testing an aplication and the idStr of the application changes all time while the page is loading. And I was using the method wildcards and  mapped the objects with the other properties how the tagname, class name etc, properties that doesn´t change. But  still I have the problem. Could you help me please??



  • Do you get the "Object not found" error? Post here the message from the test execution log, the list of properties used to identify the problematic object in the Name Mapping and the actual values of these properties shown in Object Browser. BTW, it may be one of the parent objects is missing.