Page 1 of 1
Identify forms with Upgrade from Ranorex 2.1 to 3.0.2
Posted: Tue Jun 14, 2011 12:24 pm
by madhugu
Hi,
I have been using Ranorex 2.1 and have my object repository for all my forms with XPath. Today I upgraded to Ranorex 3.0.2 and I get the following error
Ranorex.CapabilityNotSupportedException : Item 'FormLogon.Self' is no Form.
Where "FormLogon's definition is
Code: Select all
public FormLogon(RepoGenBaseFolder appFolder) :
base("FormLogon", "/form[@title='Logon']", appFolder, 60000, null)
{
}
The title is the same with the latest spy too. I have also made changes to the settings as mentioned in the "Breaking Changes" section in
http://www.ranorex.com/support/user-gui ... html#c3338. Also I have added the following lines of code to my application
Code: Select all
Ranorex.Core.PluginManager.Instance.LoadDefaultPlugins();
Ranorex.Plugin.MsaaFlavor.Instance.FilterCompatibiltyLevel = Ranorex.Plugin.MsaaFlavor.CompatibilityLevel.V2X;
Ranorex.Plugin.Win32Flavor.Instance.UseLegacyFormRole = true;
Should I be doing something else to make my objects recognizable?
Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2
Posted: Wed Jun 15, 2011 12:31 pm
by Support Team
Hi,
Please could you post us a Ranorex Snapshot of your entire application, because it seems the form isn't recognized as a Windows Forms Control.
How to create a Ranorex Snapshot. Maybe there is a conflict between the frameworks or you forgot to add the app.config file. If your application use the .Net 4.0 framework, did you install the full framework?
Also take a look to the troubleshooting section for WinForms:
http://www.ranorex.com/support/user-gui ... html#c3250
Regards,
Peter
Ranorex Team
Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2
Posted: Tue Jun 21, 2011 4:39 pm
by madhugu
Hi,
I have sent the snapshot to
[email protected] as an attachment. And my test application uses .net framework 2.0 and the other installed .net frameworks are 3.5 and 4
Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2
Posted: Wed Jun 22, 2011 10:07 am
by Support Team
Hi,
Please have a look at our troubleshooting section which might help you solving your issue as Peter mentioned before:
http://www.ranorex.com/support/user-gui ... html#c3250
Regards,
Tobias
Support Team
Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2
Posted: Wed Jun 22, 2011 1:16 pm
by madhugu
Hi,
I have tried the troubleshooting section. None of those match with the scenario that I am facing. If Ranorex Spy was able to identify the form, why not the automation code identify it? Instead it throws an exception saying that it is not a form.
Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2
Posted: Wed Jun 22, 2011 3:39 pm
by Support Team
Hi,
madhugu wrote:I have tried the troubleshooting section
And even reason 5 doesn't work for your issue? Could you post the Ranorex report file (*.rxlog) generated by a failed test?
If your application uses the .Net 4.0 framework, do you have the full framework installed? Cause Ranorex Studio needs the full framework.
Did you create a new solution with Ranorex 3.0.2 or did you follow
the steps to convert an existing project following the documentation? If you've created a new solution with Ranorex is it working then or only with the old 2.x project?
Regards,
Peter
Ranorex Team
Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2
Posted: Thu Jun 23, 2011 10:30 am
by madhugu
Ok, now I figured out why the forms were not being returned when I run the automation package. In 2.1 when we genereated code for the forms, the constructor used to take in null, like
Code: Select all
_formlogon = new ObjRepoFolders.FormLogonAppFolder(null);
in a static constructor. Now, in 3.0 it has been changed to
Code: Select all
_formlogon = new ObjRepoFolders.FormLogonAppFolder(this);
And this has made all the difference. We do not use Ranorex Studio. Our automation library uses nunit and references Ranorex.Core. So didn't give a change for Ranorex Studio to update the Repository.
Thanks for your support.
Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2
Posted: Thu Jun 23, 2011 6:07 pm
by Support Team
Hi,
Thank you that you posted that information, we had no such report before. Maybe it help out other users.
You are welcome.
Regards,
Peter
Ranorex Team