Forum Discussion
TanyaYatskovska
Alumni
12 years agoHi Florent,
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.
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.