Forum Discussion
tristaanogre
13 years agoEsteemed Contributor
Well, again, I think your problem is that you're using the Name property instead of a mapping of multiple properties. Because you're using the "name" property, you're having to put the name in which, in the object browser, includes the index. If, however, you use things like WndClass, WndCaption, etc, as a set of properties and values in your Find statement INSTEAD of the Name, perhaps that will work better.
If you were just calling SwingObject as a method, you could leave off the index, but because of your implementation, that's not going to work.
So, to go with what you're looking for, you could do
This will search the tree to a depth of 20 objects looking for all objects with a class of GenericTable and a caption that is blank and return it to you (assuming, of course, that the proper property names are "Class" and "Caption" and not something like WndClass and WndCaption or other wise).
In short: as a rule of thumb, I never use Name, FullName, or MappedName in any of the Find methods as they are already dependant upon other internal workings of TestComplete for "finding" those objects.
If you were just calling SwingObject as a method, you could leave off the index, but because of your implementation, that's not going to work.
So, to go with what you're looking for, you could do
var MyObject = Sys.Find(["Class", "Caption"], ["GenericTable", ""], 20)
This will search the tree to a depth of 20 objects looking for all objects with a class of GenericTable and a caption that is blank and return it to you (assuming, of course, that the proper property names are "Class" and "Caption" and not something like WndClass and WndCaption or other wise).
In short: as a rule of thumb, I never use Name, FullName, or MappedName in any of the Find methods as they are already dependant upon other internal workings of TestComplete for "finding" those objects.
Related Content
- 6 years agokrogold
- 8 years agoAlexBorelli
Recent Discussions
- 2 days agoMW_Didata