Ask a Question

New Project Suite - Added Existing Tests - Now Unable to Find Object

SOLVED
heidi_n
Regular Contributor

New Project Suite - Added Existing Tests - Now Unable to Find Object

I have some tests in Project Suite A that are working. When I added those tests to Project Suite B using "Add Existing Item", now they're suddenly getting "Unable to find object..." every couple of lines. Is this normal/expected? If so, why? If not, how do I fix it? I was expecting to easily migrate existing tests from one project to another.

 

Ex: Added a working test from Project Suite A to Project Suite B. It fails on this line. If I right click > highlight, TC cannot find the object on screen:

 

before_fail.png

 

Still on Project B:

 

after_fail.png

Thank you, Heidi / Quality Assurance Specialist
1 ACCEPTED SOLUTION

Accepted Solutions
tristaanogre
Community Hero

Re: New Project Suite - Added Existing Tests - Now Unable to Find Object


@Bobik wrote:

I think Project Suite B just doesn't have approriate objects in NameMapping. Try merge NameMapping from Project Suite A to  Project Suite B. Or map same objects in Project Suite B manually.

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/mana...


@Bobik has the right of it, @heidi_n.  Tests that reference onscreen objects are looking to the NameMapping file of whatever project they are stored in.  So, if Project B doesn't have that component mapped, you'll get exactly what you experienced.

 

Another suggestion...  if the two projects are testing the same application, rather than maintaining two separate NameMapping files, you can do the whole Add -> Existing Item process to add the NameMapping file of one project to any other project.  You'd have to disconnect/remove whatever NameMapping file is on Project B but, after you do so, Add the NameMapping from Project A to Project B.  This way, any mapping changes you make in A will be immediately available to B and vice versa.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

2 REPLIES 2
Bobik
Frequent Contributor

Re: New Project Suite - Added Existing Tests - Now Unable to Find Object

I think Project Suite B just doesn't have approriate objects in NameMapping. Try merge NameMapping from Project Suite A to  Project Suite B. Or map same objects in Project Suite B manually.

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/mana...

tristaanogre
Community Hero

Re: New Project Suite - Added Existing Tests - Now Unable to Find Object


@Bobik wrote:

I think Project Suite B just doesn't have approriate objects in NameMapping. Try merge NameMapping from Project Suite A to  Project Suite B. Or map same objects in Project Suite B manually.

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/mana...


@Bobik has the right of it, @heidi_n.  Tests that reference onscreen objects are looking to the NameMapping file of whatever project they are stored in.  So, if Project B doesn't have that component mapped, you'll get exactly what you experienced.

 

Another suggestion...  if the two projects are testing the same application, rather than maintaining two separate NameMapping files, you can do the whole Add -> Existing Item process to add the NameMapping file of one project to any other project.  You'd have to disconnect/remove whatever NameMapping file is on Project B but, after you do so, Add the NameMapping from Project A to Project B.  This way, any mapping changes you make in A will be immediately available to B and vice versa.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: