This is a migrated thread and some comments may be shown as answers.

Unable to handling generic diablogs from Unit test

1 Answer 197 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chery
Top achievements
Rank 1
Chery asked on 29 Nov 2013, 12:56 AM
Hi,

I am facing an issue with a generic dialog, not able to do actions on it from my code, please find my code below, this is unit test code generated using Test Studio. When I run the recorded test (*.tstest) from VS plugin, the original source from which I generated the code it works. Also attaching the screenshot of the dialog.

GenericDialog RowDelete = new GenericDialog(ActiveApplication, "Delete", true, "");

RowDelete.ButtonText =

"Cancel";

Manager.Current.DialogMonitor.AddDialog(RowDelete);

Console.WriteLine("Delete dialog text : " + RowDelete.ButtonText);

RowDelete.WaitUntilHandled(5000);

 

/*****************************************/
I am getting following error,
/*****************************************/

System.TimeoutException: Timed out waiting '5000' msec. for any dialog to be handled '1'
Result StackTrace: 
at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilAnyHandled(IEnumerable`1 dialogs, Int32 handleCount, Int64 timeoutMilliseconds, Boolean resetHandleCount)
   at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilHandled(Int32 handleCount, Int32 timeout, Boolean resetHandleCount)
   at

 

Kindly help me, thanks in advance.

Regards
Chery Jose

 

1 Answer, 1 is accepted

Sort by
0
Velin Koychev
Telerik team
answered on 02 Dec 2013, 03:03 PM
Hi Chery,

I am sorry to hear that  you are experiencing this issue.

You should be able to use the following code:
GenericDialog RowDelete = new GenericDialog(ActiveApplication, "Delete", true, "Yes", "Confirm Deletion?");
Manager.Current.DialogMonitor.AddDialog(RowDelete);
Manager.Current.DialogMonitor.Start();
  
//you need add here some code to get to the dialog
  
RowDelete.WaitUntilHandled(15000);
Manager.Current.DialogMonitor.Stop();

If this doesn't help you, is there a way you can provide us with a copy of your test and if it is possible grant us access to your application so we can reproduce the issue on our end and give you a solution. 
If you decide to do so you can open  a support ticket instead of forum thread where all the information provided remains confidential.

Hope to hear from you soon.

Regards,
Velin Koychev
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Chery
Top achievements
Rank 1
Answers by
Velin Koychev
Telerik team
Share this question
or