tlogsdon
11 years agoNew Member
Intermittent object resolution
Hello,
I'm having a pretty hard rough time testing some Microsoft Store desktop apps. I'm using the on-screen action tool to find objects within a running app. The problem is that sometimes the objects can be found on playback, and sometimes they can't. I've adjusted the wait time, but it doesn't seem to help. The app completely loads, I can see the objects that I'm trying to access, but sometimes TC just can't find them.
If TC is able to find them, then the test will complete without issue. If it can find the first object, it can find all the objects, but it fails to find the first object more than 50% of the time. The object itself doesn't seem to matter, I've noticed the same behavior trying to access panels, text boxes, buttons, both with their methods and attributes.
I'm using TestComplete 10.40.2015.7 on Windows 8.1. I'd appreciate any helpful advice on resolving this one.
Thanks,
I'm having a pretty hard rough time testing some Microsoft Store desktop apps. I'm using the on-screen action tool to find objects within a running app. The problem is that sometimes the objects can be found on playback, and sometimes they can't. I've adjusted the wait time, but it doesn't seem to help. The app completely loads, I can see the objects that I'm trying to access, but sometimes TC just can't find them.
If TC is able to find them, then the test will complete without issue. If it can find the first object, it can find all the objects, but it fails to find the first object more than 50% of the time. The object itself doesn't seem to matter, I've noticed the same behavior trying to access panels, text boxes, buttons, both with their methods and attributes.
I'm using TestComplete 10.40.2015.7 on Windows 8.1. I'd appreciate any helpful advice on resolving this one.
Thanks,
- I also met such issue in my tests. It usually because the property value of the control changes (id, childcount, index, etc), that's why we can't get the control correctly.
I'm not sure how you access the control in you code, i map the controls into NameMapping.tcNM with a readable name. First we need to make sure the namemapping for the control is unique, otherwise, it would find a different control which is not the one you want.
When i met control not found issue, i usually ouput all properties' value of child controls under its parent (if the parent name mapping is correct), then compare the value of properties we used in test to see if they are changed. In test complete we can use aqObject.GetProperties(obj) to get properties for a control, all you need is to ouput them into test logs.
You can have a try for your own.
-Ocean