We'll use Windows Calculator application as an example. It contains buttons with digits and locations of buttons with different digits are almost similar (we use UI Automation library):
# Button 2
Calculator/Pane/Pane[1]/2
# Button 3
Calculator/Pane/Pane[1]/3
The difference is in the last component of the location.
Let's learn button `2` and use this object to click on button `3`. To accomplish the goal we will
- Use `RVL.FormatString` to change the location string (line 5).
- Update object `location` attribute with `RVL.SetLocatorOpts` (line 7).
Here is the quick reference of the FormatString and SetLocatorOpts actions you can find in the Rapise documentation.
Do not forget to do one more important step to make it all work. Objects in Rapise have Name property and it is used to find an object during playback. If Names of the object and UI element found with the location attribute do not match - then Rapise ignores such an object. So set `Ignore Object Name` property to `True`.