Playback action is different from what recorded

Bug reports.
sudiptabc
Posts: 1
Joined: Fri Jul 19, 2013 2:04 pm

Playback action is different from what recorded

Post by sudiptabc » Fri Jul 19, 2013 2:29 pm

1. I am testing a Silverlight application (windowless property set to "False"). The first window thrown is a Login screen that has User Id & Password text-box(es) and 2 buttons <Login> & <Change Password>.
2. As the login page is thrown, the application displays a message - "Validating license. Please wait"; while validation is on, <Login> button remains disabled and if a user clicks on <Change Password> button, the system would throw alert - "Busy to process previous request".
3. <Start recording> Once license validation is over, click on <Change Password> button. Change Password dialog box thrown. Change Password. <Stop recording>
4. Start Playback...Observe that while license validation is in progress, the <Change Password> button is clicked and the system throws the alert - "Busy to process previous request".
- The above result is observed on a high performing machine but in another machine the test went through successfully.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Playback action is different from what recorded

Post by Support Team » Mon Jul 22, 2013 4:23 pm

Hello,

It looks like that the button is clicked while the license validation is still in progress on your machine.
You could check for a valid license before you continue with the test using the following code snippet in your Program.cs:
try
{			
	bool licenseAvailable = Ranorex.Core.ElementEngine.WaitForValidLicense(new Ranorex.Duration(5000), new Ranorex.Duration(500));
	while(!licenseAvailable)
	{
		Console.WriteLine("RX license is not available");
		licenseAvailable = Ranorex.Core.ElementEngine.WaitForValidLicense(new Ranorex.Duration(5000), new Ranorex.Duration(500));
	}
	Console.WriteLine("RX license is available");

	Keyboard.AbortKey = System.Windows.Forms.Keys.Pause;				
	error = TestSuiteRunner.Run(typeof(Program), Environment.CommandLine);
			}
catch (Exception e)
{
	Report.Error("Unexpected exception occurred: " + e.ToString());
	error = -1;
}
return error;
Regards,
Markus (T)
.
Image