When you create tests for web pages and web applications, you access web elements as separate objects. The way you address individual web elements in tests depends on the following:
-
Whether you use Name Mapping in your tests. If you do, you can assign custom short names for your tested web elements and specify search criteria that TestComplete will use to locate those objects on the web page.
For TestComplete 14.50: Which search criteria are used depends on whether your current TestComplete test project is configured to rely on XPath expressions and CSS selectors or on identification properties provided by TestComplete (for example,
idStr
).The project is configured to use identification properties to locate web objects
The project is configured to use XPath expressions and CSS selectors to locate web objects
-
If you do not use Name Mapping in your tests, you can address web elements by their full name in the object hierarchy (the
FullName
property that you can view in the Object Browser or Object Spy). Depending on whether your project is configured to use XPath expressions and CSS selectors to locate web objects, theFullName
property will either use theFindElement
method or include the full hierarchy of the web element in the object tree.The project is configured to use identification properties to locate web objects
The project is configured to use XPath expressions and CSS selectors to locate web objects
See Also
Object Browser Naming Notation
About Object Browser Naming Notation
Tree Model
Name Mapping
Default Web Testing