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

Is RadWindow open

1 Answer 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Masoud
Top achievements
Rank 1
Masoud asked on 27 Jun 2012, 09:36 AM
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

1 Answer, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 27 Jun 2012, 02:24 PM
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
Tags
General Discussions
Asked by
Masoud
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Share this question
or