Forum Discussion
Hello nfarr7,
Have you read about 'Selectors'? If you are using a name map this may be what you need. There is also an article on conditional name mapping...
Name Mapping - Selectors
https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/selectors.html
Name Mapping - Conditional Mapping Criteria
https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/conditional-mapping-criteria.html
If you are running scripts without using a name map then check into the Find, FindChild and FindAllChildren methods. You can use a Property [Name(s)], [Value(s)] key pair set to return a target object or an array of all child objects you can loop through.
FindChild Method
https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/findchild-method.html?sbsearch=FindChild%20method
FindAllChildren Method
https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/findallchildren-method.html
PropValues
A value of a single property or an array of values of properties that the PropNames parameter specifies.
Values can contain wildcards or regular expressions:
- The asterisk (*) wildcard corresponds to a string of any length (including an empty string).
- The question mark (?) wildcard corresponds to any single character (including none).
- To specify more complicated sought-for patterns for property values, use regular expressions, in the following format: regexp:<pattern>. For example, regexp:gr[ae]y.
- The property does not support native regular expression syntax, that is, the syntax provided by scripting languages. Use standard TestComplete (non-native) syntax to specify regular expressions.
... If you find my posts helpful drop me a like! 👍 Be sure to mark or post the solution to help others out and/or to credit the one who helped you. 😎