How does DialogAttribute(IDialog customDialog) work.

4 posts, 0 answers
  1. Eric
    Eric avatar
    4 posts
    Member since:
    Sep 2010

    Posted 22 Dec 2010 Link to this post

    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?

  2. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 27 Dec 2010 Link to this post

    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
  3. Eric
    Eric avatar
    4 posts
    Member since:
    Sep 2010

    Posted 30 Dec 2010 Link to this post

    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? 
  4. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 30 Dec 2010 Link to this post

    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
Back to Top