"Restaurant A might have a button for Coke in a certain position on one panel and Restaurant B might have it in a different position on a different panel"
The coordinates on the screen do not matter if you map objects to the NameMapping repository.
The case you are describing indicates that one program will run with other presentation layers so what you can do is add another configuration to the NameMapping repository or if the changes to the presentation layer are on a larger scale then create a new project with a detachable NameMapping and add files there as a reference.
Another scenario could be that maybe we don't care which button is being selected as long as a product button is being selected and the product is rung up. Each product button has the same full class name (CFButton) so then TC maps them numerically and I've set up a template to use the TabIndex property to avoid conflicts. Even so, how can I script for TC to click any CFButton regardless of properties?
Button class name can be common for each button because it can be inherited in the program structure.
Find a different property but unique for the object.
In "Object Spy" develop advanced options for the object and look for something like "Object identifier".
Check what the project you want to automate and identify if TestComplete natively supports these components e.g. VCL Borland, WPF etc.
You can use TestComplete as a dynamic search engine. It requires you to write the function in any of your chosen progrma language supported by TestComplete.
I've looked into using Variables and couldn't work that at. I've also looked into the FindChild and FindAllChildren methods to see if maybe I could use that to return the objects (CFButtons) and go from there somehow. But, how can I actually see the objects being returned? Is there a different method that should be used?
In, out ;) :robotlol:
learn the basics of the chosen programming language and use the basics of variables in it, e.g. in JavaScript.
var variable = Aliases.obj
Aliases.obj is a class that goes back to the NameMapping repository and extracts values from it.
If you want to see what you're currently jammed into a variable, use a debugger. Search the documentation for information about the debugger.
There are a lot of methods to search for active objects on the screen and to look for those after the active process structure. One of them is for example .find()