Page 1 of 1

Different behavior of Application.FindForm() under v1.4??

Posted: Mon Mar 24, 2008 8:52 pm
by timm
Hello,

I had an application that was working fine under 1.3.1. I liked the new features in 1.4, including the ability to find a Form by title only, logging, etc., so I upgraded. The exact same code with the exception of Application.Start() converted to System.Diagnostics.Process.Start(), now doesn't find the main form of my application. Is this due to the Application class no longer doing the application start. Help would be much appreciated.

Thanks,
Tim

Posted: Tue Mar 25, 2008 10:55 am
by Support Team
The Application.FindForm methods did not change except for the code that activates the found form (i.e. brings it to the front). However, this should not have influences on the behavior of the corresponding methods.

Could you please post the code snippet that fails?

Using System.Diagnostics.Process.Start() might have an effect. Please, try to insert an Application.Sleep between the Start and the FindForm methods!

Regards,
Alex
Ranorex Support Team

Re:Different behavior of Application.FindForm() under v1.4??

Posted: Tue Mar 25, 2008 9:16 pm
by timm
Hello,

Alex: thank you for your feedback.

The good news is that I had forgotten that Ranorex.Core.dll, which isn't delivered by VS along with the rest of the dependent assemblies, was still 1.3.1. When replaced with the proper version, I got past the form issue.

But then the _same code_ that I had running with 1.3.1, was failing searches for controls/elements -- specifically children of things like groupings of buttons or tabs. Was the Form.FindControlName(), etc. functionality changed significantly?

Thanks,
Tim

Posted: Wed Mar 26, 2008 2:35 pm
by Support Team
The FindControl... and FindChild... methods have not changed since 1.3.1 except for some small performance issues that should really have no influence.

The only thing I can think of is the change in the element caching algorithm. However, this should not have an effect on the FindControl... methods.

Could you please post the code that fails or even mail a sample application and the corresponding test application to support[at]ranorex.com!

Regards,
Alex
Ranorex Support Team