not able to find object
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
not able to find object
Unable to find the following object when executing the
Reason The parent object was not found:
|
Trying to enter some value in textbox but it is failing each time.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
/Alex [Community Champion]
____
[Community Champions] 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. Posts made by [Community Champions]
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.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see you don't have much to go on with regards to object recognition for the textbox 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,
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
[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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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,
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.)
/Alex [Community Champion]
____
[Community Champions] 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. Posts made by [Community Champions]
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.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
