Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Telerik
Build modern .NET business apps
.Net Web
Cross-Platform
Desktop
Reporting and Documents
AI for Developers & IT
Ensure AI program success
AI Coding
AI Engineering
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
Debugging
AI-Enhanced UI Tools
CMS
Free Tools
Hi Jack, Try the below code and let me know if it is working.
I am having a silverlight application. When i click a button it will dispaly a message box with caption "My Message" and text
"Hello World!!!!!!". Please make sure to give Thread.Sleep() after the button click.
[TestMethod]
public
void
MessageBoxTest()
{
Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
ActiveBrowser.NavigateTo(
"http://localhost:2463/SampleApplicationTestPage.aspx"
);
// Get an instance of the running Silverlight Application.
SilverlightApp CurrentApplication = ActiveBrowser.SilverlightApps()[0];
//To activate the silverlight control
CurrentApplication.Desktop.Mouse.Click(MouseClickType.LeftClick, CurrentApplication.Bounds);
Button btnShowMessageBox = CurrentApplication.Find.ByName<Button>(
"btnShowMessageBox"
btnShowMessageBox.User.Click();
Thread.Sleep(2000);
Window msgBox =
null
;
WindowManager winManager =
new
WindowManager();
winManager.GetWindows();
foreach
(Window win
in
winManager.Items)
if
(win.Caption.Contains(
"My Message"
))
msgBox = win;
}
(msgBox !=
)
var label= msgBox.AllChildren.OfType<Window>().Where(w => w.ClassName ==
"Static"
(label.FirstOrDefault().Caption ==
"Hello World!!!!!!!!"
msgBox.Close();
Thread.Sleep(4000);