Is RadWindow open

2 posts, 0 answers
  1. Masoud
    Masoud avatar
    61 posts
    Member since:
    Aug 2011

    Posted 27 Jun 2012 Link to this post

    Hi there,

    I am trying to determine if a Silverlight RadWindow has been opened.  How do I go about this in using Telerik Test Studio Express?

    Best
  2. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 27 Jun 2012 Link to this post

    Hello Klaus,

    If you are using the recorder in Test Studio Express:
    1. Enable Hover Over Highlighting from the Recording Toolbar.
    2. Select the blue nub corresponding to the RadWindow (see screen shot).
    3. Select Build Verification.
    4. Select Window State.
    5. Click OK to add the verification to your test.

    If you are using the Testing Framework and working entirely in code, see the following example:

    SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
     
    Telerik.WebAii.Controls.Xaml.RadWindow win = app.Find.ByExpression(new XamlFindExpression("XamlPath=/canvas[0]/browserwindowpresenter[0]/examplewindow[0]")).As<Telerik.WebAii.Controls.Xaml.RadWindow>();
     
    Assert.AreEqual(true, win.IsOpen, "Property did not satisfy constraint.");

    If you prefer Visual Basic, use our code converter.

    Regards,
    Anthony
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top