cancel
Showing results for 
Search instead for 
Did you mean: 

not able to find object

Highlighted
Occasional Contributor

not able to find object

Unable to find the following object when executing the Click command:

Aliases.​browser.​pageVsureLabNmsShawCaLogin.​form.​panel.​fieldset.​textboxName

 

Reason

The parent object was not found:

Aliases.​browser.​pageVsureLabNmsShawCaLogin.​form.​panel.​fieldset

 

Trying to enter some value in textbox but it is failing each time.

10 REPLIES 10
Community Hero

Re: not able to find object

This is probably because the identification properties you are using for fieldset are not static and have changed since you recorded the test. You need to compare what you see in the object browser, vs what you have mapped.

 

If you can provide screenshots of both the mapped object properties, and the properties in your object browser we can help. 


Thanks,
Carson

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

Re: not able to find object

Please find attached test screenshots for name mapping and properties in your object browser. I am not able to figure out the issue.

 

Thanks in Advance

Community Hero

Re: not able to find object

Hi,

 

The 'Object not found' error for NameMapped/Aliased objects in almost all cases originates from one of those cases:

-- Values of the properties used to NameMap the object are not stable. To correct this you must compare existing set of properties/values used in NameMapping with their values for the actual object and edit NameMapping so that the object can be identified stably and uniquely;

-- Object does not exist at the moment when test code attempts to use it. In this case you need to wait long enough to let the object appear. .WaitAliasChild() method usually works well in this case;

-- The object was recreated by page script code as a result of either Ajax request or data refresh. In this case you need to get the object again.

 

Consider when the problem occurs in your test code and what from the above may be the reason for it and correct test code/NameMapping appropriately.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Community Leader

Re: not able to find object

I see you don't have much to go on with regards to object recognition for the textbox Smiley Happy  This error however seems to have to do with the identification properties of the panel containing the textbox.  You may find that there is more to go on with regards to object identification on the panel to ensure it's identified properly


-------------------------------------------------
Standard syntax disclaimers apply
Regards,
Community Hero

Re: not able to find object

Note that the object recognition error in your OP is because it is unable to find the parent object, not the text box.  Whatever is mapped as "fieldset" cannot be found.  If the parent can't be found, subsequent child objects will not be able to be found.

 

Please post the properties and mapping for "fieldset".  Note, also, that there is a link in the object browser when viewing properties to see an "Advanced" view.  That view will expose a LOT more properties so that you may be able to map the object using other values to make the identification more robust.


Robert Martin
[Community Expert Group]
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
Extensions available
Community Leader

Re: not able to find object


@tristaanogre wrote:

Note, also, that there is a link in the object browser when viewing properties to see an "Advanced" view.  That view will expose a LOT more properties so that you may be able to map the object using other values to make the identification more robust.


Yes, It's rare, but sometimes I have found that the only thing to distinguish two items is that one has no onClick event...

On a side note, if it is under your control, you could change the ID of the textbox/table.etc. in the markup to make it unique. Sometimes, the best approach to testing is to write your application in a testable manner. A good example of this would be the support for node.js data attributes, where you build the attributes into the markup to help your tests find the items


-------------------------------------------------
Standard syntax disclaimers apply
Regards,
Occasional Contributor

Re: not able to find object

My suggestion would be, dont go by panel wise search, this is very tricky and may land you in problem in future. Instead go by page object pattern and use locator(s) strategy e.g Xpath (relative) or cssselectror etc. This will save you lot of maintenance in future.

Community Hero

Re: not able to find object

@santi:

Hi,

 

> page object pattern

Namemapping and Aliasing is, actually, much improved version of page object pattern.

 

> Xpath (relative) or cssselectror

No. This is a wrong way to go in TestComplete's world. (It will work, but it is far less flexible, reliable and convenient when compared to Aliasing and .FindXXX() methods.)

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Occasional Contributor

Re: not able to find object

For our current application which is electron and angular based alias based was a severe failure, we switched to POP and it worked wonder.

 

we use combination of Find()/FindChildren() with locator combination and it is amazingly fast for us, after lot of tickets and discussions.