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

Telerik recorder vs System Windows Dialog box

6 Answers 96 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mark
Top achievements
Rank 1
Mark asked on 14 Jan 2013, 11:28 AM
Hi All,

It seems that the telerik recorder doesn't recognize the windows dialog.
In the code:
System.Windows.Forms.OpenFileDialog
openFileDialog = new System.Windows.Forms.OpenFileDialog();

It's pretty annoying to be stuck in a test case capture just because of that.
For example, in my test case, I would like to delete a file and a windows dialog box ask for a confirmation and I can't click yes or no as Telerik doesn't recognize it.
Do you have any ideas to solve this issue?

Thanks in advance for your help.

6 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 17 Jan 2013, 10:05 AM
Hello Mark,

I am sorry to hear you are experiencing this issue.
From your explanation it seems more like unexpected dialog rather than OpenFileDialog. Could you please try to use this code instead:

this.Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.HandleAndContinue;

If you continue experiencing this issue please provide more information like screen shots or short video demonstrating this behavior. The best scenario here will be if you can provide us with access to the application you are testing so we can take a look.

Regards,
Ivaylo
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Mark
Top achievements
Rank 1
answered on 18 Jan 2013, 12:41 PM
Hi Ivaylo,
Thanks for trying to help me.
Could you please tell me how can I add this piece of code?
Actually, I didn't have to add any code since I've started with Telerik.
I know I can customize a step in the code but it seems I can't add your piece of code like that.
Thanks again for your assistance.
0
Ivaylo
Telerik team
answered on 22 Jan 2013, 03:45 PM
Hello Mark,

Please check the following article in order to proceed with adding a custom coded step to your test. Please refer to the first method explained.

Kind regards,
Ivaylo
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Mark
Top achievements
Rank 1
answered on 23 Jan 2013, 05:02 AM
Thanks a lot Ivaylo for your support. Now it works :)
0
GREGORY
Top achievements
Rank 2
answered on 16 Apr 2013, 08:48 PM
I am having a similar issue.  In my case however, interaction with the Windows form is required to commit the action being tested to the database (Confirm/Delete a file upload).  The UnhandledDialog code you provided will cause the test script to not "error", but it will not give me "access" to automate the Confirm button click on the Windows form which pops-up.  Is there a way around this?  Thanks so much!

0
Ivaylo
Telerik team
answered on 18 Apr 2013, 02:03 PM
Hello Gregory,

You can try to workaround this behavior by pressing Enter key since it seems the Confirm button is active. In order to proceed you can add the following code right after this window appears:

Manager.Desktop.KeyBoard.KeyPress(Keys.Enter);

Please note that you might need to add an assembly reference to System.Windows.Forms as
demonstrated in this video. And you should add the following line as well:

using System.Windows.Forms;

Kind regards,
Ivaylo
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Mark
Top achievements
Rank 1
GREGORY
Top achievements
Rank 2
Share this question
or