|
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的帮助很详细啊 |
|