Ask a Question

Why do my recorded test object names change?

SOLVED
cristina88
Occasional Contributor

Why do my recorded test object names change?

I started out recording my scripts (which I think I might be regretting, but it helped get them up and running in a faster timeframe).

 

1. If I run a test and it passes one day but not the next because the object names are clearly not the same (they are close) I'll do an object spy and fix.  Might work for that day and then another test run, objects will fail:

example:

   Object name was:   Aliases.browser.pageDevices.linkGoToHomePage.textnodeHome
   Todays' object name is:  Aliases.browser.pageDevices.panelPageContainer.panelPageHead.linkGoToHomePage.textnodeHome

 

My development team says they are not changing anything but clearly something is changing somewhere.  I can add wildcards to a certain extent but wondering why this is happening?

 

2. Also why am I getting mapped objects being called:  Sys.browser, then another Sys.browser 2, browser 22and Sys.browser 3... what is the reason for this?   I'm afraid to delete the newer 2 and 3 browser hierarchy in fear I would break my scripts.  (I could delete one and see where that takes me) but thought I'd check with other Test Complete users first.  

 

If I'm doing something wrong, I would love to know what it is.

 

Thanks All to who might respond.

1 ACCEPTED SOLUTION

Accepted Solutions
cunderw
Community Hero

Re: Why do my recorded test object names change?

This can be solved by properly configuring your environment as mentioned here:

 

http://support.smartbear.com/testcomplete/docs/app-testing/web/general/preparing-browsers/internet-e...


Thanks,
Carson

Click the Accept as Solution button if my answer has helped

View solution in original post

7 REPLIES 7
cunderw
Community Hero

Re: Why do my recorded test object names change?

This is a symptom of relying solely on automatic name mapping. I would suggest reading everything about name mapping in the test complete documentation and update your identification properties.


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
NisHera
Valued Contributor

Re: Why do my recorded test object names change?

to add to @cunderw it is better to have a solid base of name mapping from the beginning.

later when you add up things it is difficult  (or rather impossible) to clean it up.

 

to address your question 2 clean it up (delete unwanted / tide  up  ) now.

If test breaks it would be more easy to fix now than later.

 

and in my opinion recording is good for learning and get kind of  coding structure or parts .

but to add reliability and re-usability you have to modify those.

 

shankar_r
Community Hero

Re: Why do my recorded test object names change?


example:

   Object name was:   Aliases.browser.pageDevices.linkGoToHomePage.textnodeHome
   Todays' object name is:  Aliases.browser.pageDevices.panelPageContainer.panelPageHead.linkGoToHomePage.textnodeHome


In the above case, you can use Extended Find to your solve your problem.

 

after your change based on Extended Find output should be,

Aliases.browser.pageDevices.linkGoToHomePage.textnodeHome


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

socaltester
Contributor

Re: Why do my recorded test object names change?

, et al. do you have any recommended posts, videos, documents that provide excellent information on name mapping? Especially as it relates to modifying automated object identification scripts?  

cristina88
Occasional Contributor

Re: Why do my recorded test object names change?

From what I can tell - I have a reason of why object names change. Was occurring when my scripts were coded:   Since we support the browser Internet Explorer, I realize that even when an IE window is closed there are some residual files (iexplore.exe and iexplore.exe *32) running in the background (can see via Task Manager). 

 

The Solution: 

I make sure to delete any extra IE processes that are running via Task Manager and that seems to solve all my issues.  I close out All IE browser windows and just keep the one IE browser window open that I am working with.  Thanks All

cunderw
Community Hero

Re: Why do my recorded test object names change?

This can be solved by properly configuring your environment as mentioned here:

 

http://support.smartbear.com/testcomplete/docs/app-testing/web/general/preparing-browsers/internet-e...


Thanks,
Carson

Click the Accept as Solution button if my answer has helped

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: