Forum Discussion
In automation we run previously identified UI objects in a given order.
So that manual repetitive work are assigned to a machine.
If those objects are "Brand new", TC do not have a capacity to identify.
But if this new object has particulate pre-determined unique properties,
you can program with wild cards, loops and conditions to handle those.
If you can elaborate more we may able to help
You might want to also look into Find and FindChild methods. Supposedly, you know what the object is that you are adding (caption, text content, etc). So, taking the parent object, you could call the "FindChild" method, passing in the properties and property values. This method will return the object you want.
I would not recommend attempting to map any of these dynamically added objects. This is generally a rule of thumb that I apply. If objects/components etc are added on the fly and created within the application (like new rows in a table, new icons in a panel, etc), I use Find methods to interact with them.
Something else I would recommend is a "clean up" process at the end of your test run or a "reset" process at the beginning. Your application is going to get "full" of all these created items and objects each time you run the tests. Once you complete a test, if you're finished with an object, if you have the ability to, I would remove/delete the item so that future test runs will not be "polluted" by extraneous test artifacts. Alternatively, you could do a database restore or some other "reset" process before you test starts to get your application to a "baseline" state so that, when you start your tests, they always start with the same basic data.
Related Content
- 2 years ago
- 13 years ago
- 12 months ago
Recent Discussions
- 3 days ago
- 4 days ago