Forum Discussion

tshering's avatar
tshering
New Contributor
7 years ago

Error with executing test scripts. Object could not be found.

I made a test script in Javascript the previous day, which was executing just fine. But when i execute the same script today, the execution stops with error as objects could not be found. I figure certain values are changing, to why the objects could not be found. If i am to automate these tests in the future, this is not efficient. Any helpful suggestions and advices would be most welcome. Thank You!

2 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero
    • What is the object you trying to Set the Text?
    • Have you verified that Object has unique property to identify in your AUT?
    • Is there any delay for that Object to became visible r enabled or exists in your AUT?

     

    I guess you problem might fall under these three things. Post here if you are into any other issues

  • NisHera's avatar
    NisHera
    Valued Contributor

    Hi, welcome to test automation..!

    Yes you can not use properties that are changing ..but there are many ways to over come.

    1) Check for a property that is stable and unique. for more read this and this

    2)using wild cards / conditions in object mapping see this documentation

    3) Finding your object from stable parent object using Find Child

     

    in last two options you have to determine how your object is going to change.

    if there are more detail we may able to help.