Forum Discussion
Dmitry_Nikolaev
13 years agoStaff
Hi Anil,
As far as I understand, you are using the DOM web tree model in your project. This makes TestComplete to have all objects on the web page in a plain list without a hierarchical structure. While this approach shortens full names of tested objects, it makes it impossible to an object depending on its position in its hierarchy as in the Tree model.
For example, in case of the Tree model, you can find the table cell object containing specific text (e.g. 'GARDEN SIDE'). Once you find this cell object, you will know that is has column index '0' and row index '8'. All you need to get the green button object corresponding to this item is to get a button object laying within a cell with column index '1' and row index '8'.
You can find more information on web tree models in the Web Tree Models help topic.
It is still possible to do something similar for the case of the DOM tree model, but I need to see the HTML code of the page prepare a sample script for you. If you want me to do this, please send me the text of the HTML page containing this table using the Contact Support form. You can get the HTML code of the page using this code:
function getHTMLIExplore()
{
var page = Sys.Process("iexplore").Page("*");
var htmlCode = page.Application.document.documentElement.outerHTML;
Log.Message("See HTML in Additional Information pane", htmlCode);
}
Related Content
- 12 years ago
- 8 years ago
- 5 years ago
Recent Discussions
- 3 days ago
- 4 days ago