Page 1 of 1

Conatainer with Tab

Posted: Fri Jan 16, 2009 7:56 pm
by Berny_B
Hi,

In Ranorex 2.0 (version: 2.0.0.4977).

We have a form with 4 different tabs (Janus.Windows.UI.Tab.UITab) . I'm using the recorder to generate the code and it creates a Ranorex.TabPageList in the GlobalReprository after the replay.

If I'm using the recorder to play back the test it works fine. The Build function does not generate any error but when I run the compiled program it can't seem to find the tabs on the screen and the test fails.

Any ideas?

Thanks,

Posted: Mon Jan 19, 2009 6:40 pm
by Support Team
Did you call

Code: Select all

PluginManager.Instance.LoadDefaultPlugins();
before executing any Ranorex code? (If you download the new Ranorex 2.0 RC1, this call won't be needed any more.)
If you did, please post the exception text and the code that throws the exception!

Regards,
Alex
Ranorex Support Team

Posted: Mon Jan 19, 2009 7:31 pm
by Berny_B
Yes the call was there.


There's no exception, the execution just stops at the CustomerTab. Here's the code:

Code: Select all

	public class Recording4
	{
	
		public static void Start()
		{
		    Mouse.DefaultMoveTime = 300;
		    Keyboard.DefaultKeyPressTime = 100;

			GlobalRepository.DesktopExplorer.ListItemShortcut_to_bxsystemsUti.Click("42;16", 2);

			GlobalRepository.FormBXSYSTEMS__Revente_délec.ElementTopRibbon.Click("88;42");
			GlobalRepository.FormBXSYSTEMS__Revente_délec.ElementTopRibbon.Click("216;40");
			GlobalRepository.FormBXSYSTEMS__Revente_délec.ElementTopRibbon.Click("78;39");
			GlobalRepository.FormBXSYSTEMS__Revente_délec.ElementTopRibbon.Click("57;86");
			Keyboard.Press("{NumPad1}{Return}");

			GlobalRepository.FormBXSYSTEMS__Revente_délec.ContainerMainPanel.ContainerGridEXCustomers.Click("37;28", 2);
			GlobalRepository.FormBXSYSTEMS__Revente_délec.ContainerMainPanel.CustomerTab.Click("36;11");

Code: Select all

// <summary>
			/// The CustomerTab item.
			/// </summary>
			public  Ranorex.TabPageList CustomerTab
			{
				get 
				{ 
					return CreateAdapterForPath<Ranorex.TabPageList>("CustomerTab", "*/tabpagelist[@accessiblerole='PageTabList']", 300);
				}
			}
Regards,

Berny

Posted: Tue Jan 20, 2009 11:41 am
by Support Team
First of all, please download the current Ranorex 2.0 RC1 from our homepage!

When the execution stops, could you please check if your CPU is working heavily (by opening the TaskManager and looking on the Performance tab)? Then pause the execution in RanorexStudio, please,and send us the current stacktrace (to support_at_ranorex.com)?
What control framework (Win32, MFC, Windows Forms, WPF, ...) do you use?
Could you provide us a sample application or at least a snapshot of the application (right click on corresponding element in RanorexSpy and choose "Save as snapshot...")?

Thanks!

Regards,
Alex
Ranorex Support Team

Posted: Wed Jan 28, 2009 5:34 pm
by Berny_B
Hi Alex,

I did install RC1. The CPU is working around 25% before the error and peaks at about 45%. We are using Janus UI Controls for .Net.

I'm sending the error log and snapshop to your support address.

Regards,

Berny

Posted: Wed Jan 28, 2009 5:54 pm
by Support Team
From your log file it does not look like exection "just stops", but there is an exception logged saying an item cannot be found.

If the replay works in RanorexRecorder and does not work with the generated code, inserting a delay before the corresponding item could be the solution. The generated code in Ranorex 2 RC1 does not include delays except for manually added delay actions (the next release will include delays). Could you please try adding a delay action before the action that fails?

Regards,
Alex
Ranorex Support Team

Posted: Wed Jan 28, 2009 7:25 pm
by Berny_B
I did increase the Search Timeout property of the item (from 5000ms to 8000ms) and also inserted a Thread.Sleep(5000) before the item gets call. I still get the same error.

Regards,

Berny

Posted: Thu Jan 29, 2009 12:19 pm
by Support Team
That's strange. And the replay in the RanorexRecorder still works?

You can try disabling the caching for the item that fails. Click on the corresponding item, open its properties (toolbar button in Repository Editor) and set the "UseCache" property to false.

Regards,
Alex
Ranorex Support Team

Posted: Thu Jan 29, 2009 3:10 pm
by Berny_B
Disabling the caching on the item didn't resolve the issue. I Also tried to disable the "Enable folder caching" configuration option but that didn't resolve it neither.

Yes, the replay still works.

Any other thoughts?

Berny

Posted: Thu Jan 29, 2009 3:47 pm
by Support Team
Sorry, I should have told you to disable the caching of the folder of the corresponding item. Please, try to set the "UseCache" property of the folder to false.

Regards,
Alex
Ranorex Support Team

Posted: Thu Jan 29, 2009 4:24 pm
by Berny_B
Thanks for the great help.

That did solve my problem.

Regards,

Berny

Posted: Thu Jan 29, 2009 5:56 pm
by Support Team
Could you, please, send us a sample application that contains that control so we can fix this bug?

Regards,
Alex
Ranorex Support Team