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

How does DialogAttribute(IDialog customDialog) work.

3 Answers 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 22 Dec 2010, 10:16 PM
I've used the Dialog(DialogButton.OK) before but I have a question on how to use the DialogAttribute with the IDialog customDialog constructor. 

[TestMethod]
[Dialog(new ConfirmDialog(Manager.Current.ActiveBrowser, DialogButton.OK))]
public void TestCase()
{
     // This gives me an error. "An attribute argument must be a constant expression, typeof expression or array creation                      expression of an attribute parameter type
}

So my question is since attributes require constant expressions for their arguments how does the DialogAttribute work for "Custom" dialog handling?

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 27 Dec 2010, 08:44 PM
Hello Eric,

we are deprecating the DialogAttribute. Instead please create your custom dialog handler as documented here. If you have questions following this documentation, we'll be happy to assist.

All the best,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Eric
Top achievements
Rank 1
answered on 30 Dec 2010, 07:16 PM
Is there a plan to replace it with another mechanism? Or just point everyone in the direction of creating dialog handler objects and manually adding them to the DialogMonitor? 
0
Cody
Telerik team
answered on 31 Dec 2010, 05:14 AM
Hi Eric,

We are planning on rewriting our whole dialog handling framework from scratch one day in the near future. We're not completely happy with some of the quirks the existing framework has with dialog handling. However the date and the exact architecture hasn't been nailed down yet. So for the next few months at least using the DialgMonitor as is currently documented is our recommended approach.

Regards,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Tags
General Discussions
Asked by
Eric
Top achievements
Rank 1
Answers by
Cody
Telerik team
Eric
Top achievements
Rank 1
Share this question
or