Forum Discussion
fmorel-isnard
11 years agoOccasional Contributor
Hi Tanya,
Thanks again for your reply.
Despite your explanation , I don't understand why the FindChild method works in FF and IE8. In my code "data-varname" is not a property listed in the Object Browser, however I can find my object. How is this possible?
Thanks.
Thanks again for your reply.
The FindChild method searches for an object by its properties (listed in the Object Browser) - it doesn't search through HTML elements on the page. TestComplete gets the list of properties from a browser. This can be the reason why the code works in FF and IE 8.
However, it's more accurate to use FindChildByXpath to find an object by its HTML attributes, and FindChild to find an object by its properties.
It's expected that data-varname is specified in the outerHTML property as it contains the source code of the page. In this case, it's more correct to use outerHTML in FindChild.
Despite your explanation , I don't understand why the FindChild method works in FF and IE8. In my code "data-varname" is not a property listed in the Object Browser, however I can find my object. How is this possible?
Thanks.