Forum Discussion
tristaanogre
15 years agoEsteemed Contributor
if you can provide screenshots demonstrating the form you are working with, what is currently being used in the mapping of that form (in this case, FarmaProForm), and the list of available properties for that form, it will be easier to provide you with more specific help.
As for your particular problem you just posted about, that could still be a problem with it not able to find the form because of dynamic properties. If the mapping of FarmaProForm doesn't match the properties of the actual object on playback, you'll get that kind of error.
However, another possibility is that, on playback, the form in question may not be displayed by the time you try to execute the keys method. If there is a delay between running your application and having the form display, you need to make sure you add to your tests some sort of code to specify that it wait until the form exists. The best way to do this, in your case, is to add to your tests the WaitAliasChild method so that, after running the application, you wait for the form to appear before you move on. Something like
TestedApps.FarmaPro.Run()
while (!Aliases.FarmaPro.WaitAliasChild("FarmaProForm", 500).Exists)
{
Delay(500)
}
That's a quick and dirty example that will probably need to be tweaked and/or modified to the specifics of your test project but, hopefully, you get the general idea.