Page 1 of 1

Playback action is different from what recorded

Posted: Fri Jul 19, 2013 2:29 pm
by sudiptabc
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.

Re: Playback action is different from what recorded

Posted: Mon Jul 22, 2013 4:23 pm
by Support Team
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)