51Testing软件测试论坛

标题: testcomplete 中的 Tag model 和 DOM model 区别 [打印本页]

作者: winnertesting    时间: 2010-3-10 14:44
标题: testcomplete 中的 Tag model 和 DOM model 区别
testcomplete 中的 Tag model 和 DOM model 区别,看了半天没看明白。请名师指点!
作者: carol2000    时间: 2010-4-19 13:44
After you found the Page object, you can explore the web page elements.

All page elements are shown as child nodes of the Page(...) node. The elements can be displayed via four different object models: DOM, Tag, Tree or Hybrid. The model being used is specified by the Tree model project property. In the DOM model, all web page elements are children of the document.all collection, which is similar to the HTML object model used in web scripts. The Tag model provides more “readable” element names and can be useful in the initial stages of testing to receive the general overview of the page. Besides, script operations over web pages with a large number of elements are executed faster with the Tag model. Even more faster is the Tree model. When it is active, the hierarchy of objects is similar to their actual parent-child relationships on the page. The Hybrid model combines both DOM and Tree models. It is intended for running test projects that were created in earlier versions of the product.

============
DOM Model
When the DOM model is active, the Page object contains the document and frames properties and the web page elements are accessible through the document.all property:
Tag Model
When the Tag model is active, the elements of the tested web page are grouped by their tag names. For instance, all images are displayed under the IMG node and all links are displayed under the A node
TC7的帮助很详细啊
作者: TIB    时间: 2010-5-6 10:48
组织对象元素的层次结构和描述方式不大一样




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2