Forum Discussion
( Replied in the wrong place, and cant delete comments )
If the FullName is Sys.Process("Phoenix").Window("Phoenix", "Phoenix", 1).Window("MDIClient", "", 1).Window("AfxFrameOrView140su", "Phoenix", 1).Window("AfxFrameOrView140su", "", 1).Window("#32770", "", 10) then
Ensure the child object .Window("#32770", "", 10) value does not change.
Also ensure the parent objects .Window("AfxFrameOrView140su", "", 1) values does not change, including it's parent objects.
In your new project, run your automation script, if it stops because it's not able to find the name mapping. Then use the Object Spy tool to identify your UI object - do not close your application.
- jgibbs34320 days agoOccasional Contributor
So, in doing this I've noticed that the issue may be caused by the fact that the software is not already open prior to running the test, as I Open and close the software for every test. So I need to look into what about opening the software changes.
For reference, if I run the test and it fails, and i then run it again with the same instance, it works fine, so all of the elements of the name mapped item are the same every time i open the software, so I'm still not sure why this is happening, but i will be trying to get to the bottom of it.
- Hassan_Ballan19 days ago
Champion Level 3
It is recommended to start and close the application for each test as you are doing. If the test fails on the first run but passes when re-run on the same instance, that may suggest a timing or synchronization issue — e.g., the application isn’t fully loaded or ready when the test begins. On re-run, it’s already initialized, so everything works.
💡 What You Can Try
- Ensure your Name Mapping includes reliable properties (like WndClass or ObjectType) and not just dynamic ones like WndCaption.
- Use TestedApps to start the application within your test.
- Add wait logic to confirm windows/controls are ready before interacting with them (like WaitWindow, WaitChild, or Exists). Avoid hard-coded delays (aqUtils.Delay) in favor of conditional waits.
- Double-check whether multiple instances of the app or hidden background processes may be affecting recognition.
🤖 AI-assisted response.
💬 Found the answer helpful? Give it a Kudos by clicking Like!
✅ Got your issue resolved? Click Mark as Solution so others can find it quickly.