Object Alias Issue
Hi all
I am facing the below issue everytime I try and execute my test.
The problem here is when I initially use ObjectSpy to map the object, I get a mapped name eg: ListBox21 but after executing the test I get 'Object not found error'. After the failure, when I spy the same Object again it has now a different mapped name eg:ListBox15. I am not sure why the mapped name is changing after every run causing my test to fail. Any guesses?
Regards
G
Pretty much what I suspected: That the property(ies) of the object that you're using for identification are changing dynamically each time the application or test is run. The solution is to find a property or set of properties that will uniquely identify the object so that, no matter what, it will always find the right one.
Looking at the properties you've supplied, my suggestion would be to not use the Name property for mapping. Instead, I'd use a combination of two or three properties:
ObjectType = List
ObjectIdentifier = ListBox
wItemList = <the full list>
Now, you COULD get away, I think, with just the first two assuming that the same screen doesn't have more than one list box on it. If it only has the one, ObjectType and ObjectIdentifier should be sufficient. If it has more than one list box, the other unique identifying factor is the list of items contained.
Change your mapping to this and you'll have a more stable mapping for your list box