Forum Discussion

sony_ratnakar's avatar
sony_ratnakar
New Contributor
12 years ago

How to deal with changing object properties?

Hi,



I have a windows based dotnet application installed on a virtual machine. I am trying to automate the test cases using Test Complete which is also installed on the same virtual machine. 

I am trying a script to launch the application and then select a listbox item from the main form of the launched application.The script successfully launches the application with a login window. The Login window has a listbox which am trying to identify using the object properties. But the object properties are inconsistant. Can anybody suggest me on how to  make the object properties to remain consistant?



Thanks in advance.
  • vajindarladdad's avatar
    vajindarladdad
    Frequent Contributor
    Hi,



    Can you please tell which property is changing all the time?

    Can recommend you the best approach , once we get the property name you are using for identification purpose.



    I would recommend you to use the NameMapping file and map the objects using their unique properties.



    Mapping the objects will make your 99% of task done.



    Please use following link to get more information

    http://support.smartbear.com/viewarticle/27370/



    http://support.smartbear.com/viewarticle/27370/#RecogFailures 





    To go further ,

    If you are not using NameMapping file then you can use the below functions to get the objects at runtime:



    1) FindChild

    2) Find

    3) FindAllChildren

    4) FindId

    5) Find

    6) Child

    7) WaitChild etc.