Identify forms with Upgrade from Ranorex 2.1 to 3.0.2 : Object Identification and Technologies

Identify forms with Upgrade from Ranorex 2.1 to 3.0.2

Technology specific object identification, supported applications, web technologies, and 3rd party controls.

Identify forms with Upgrade from Ranorex 2.1 to 3.0.2

Postby madhugu » Tue Jun 14, 2011 1:24 pm

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-guide-20/working-with-2x-projects-in-3x-test-suites.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?
madhugu
 
Posts: 6
Joined: Tue Jun 14, 2011 1:16 pm

Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2

Postby Support Team » Wed Jun 15, 2011 1:31 pm

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
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2

Postby madhugu » Tue Jun 21, 2011 5:39 pm

Hi,

I have sent the snapshot to support@ranorex.com as an attachment. And my test application uses .net framework 2.0 and the other installed .net frameworks are 3.5 and 4
madhugu
 
Posts: 6
Joined: Tue Jun 14, 2011 1:16 pm

Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2

Postby Support Team » Wed Jun 22, 2011 11:07 am

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
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2

Postby madhugu » Wed Jun 22, 2011 2:16 pm

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.
madhugu
 
Posts: 6
Joined: Tue Jun 14, 2011 1:16 pm

Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2

Postby Support Team » Wed Jun 22, 2011 4:39 pm

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
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2

Postby madhugu » Thu Jun 23, 2011 11:30 am

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.
madhugu
 
Posts: 6
Joined: Tue Jun 14, 2011 1:16 pm

Re: Identify forms with Upgrade from Ranorex 2.1 to 3.0.2

Postby Support Team » Thu Jun 23, 2011 7:07 pm

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
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Object Identification and Technologies

Who is online

Users browsing this forum: No registered users and 0 guests

cron