Forum Discussion

andy_cheetham's avatar
andy_cheetham
Occasional Contributor
11 years ago

Name used to map a control changes between recording and running a test

This all happens on the same windows 8 machine with no changes to the setup or configuration at all.



I am recording some tests for our Windows Desktop application. But I am having diffculties when it comes to reliably replaying these tests over and over again.



Our application is made up from a number of different components, but the two I'm having an issue with here is the main MFC application which via COM consumes a .Net assembly which displays a form.



When I recorded the test the .Net form is recorded as:



WinFormsObject("FormBinGridProprties")



However after running the test a couple of times the window can no longer be found.

When viewed within the object viewer the window is identififed as:




Window("WindowsForms10.Window.8.app.0.194e1a4", "Bin Grid Properties", 1)



I can get around this by getting the tests to map the window by using the caption. If I do this it successfully finds the window however I then get problems when trying to access the MainMenu.



What I don't understand at the minute is why the window is sometimes  identififed as a .net control then at other times not.



Please help, as I have so far spent a fair amount of time trying to get this to work.



Cheers

Andy