Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Actually, I am doing one sample in wpf using Telerik Testing Framework, in that sample i am using Message Box. Here i want to test my Sample all controls are recognized I created objects for those classes (textbox,Combobox,Radiobutton and Checkbox) but i didn't create object for Message Box class.So i want to create Wrapper class for Message Box.
XML
WpfApplication wpfApp = manager.LaunchNewApplication(@"C:\Users\bhadram.nagaveera\Desktop\MVVM_WPFSample\MVVM_WPFSample\bin\Debug\MVVM_WPFSample.exe");

            Assert.IsTrue(wpfApp.MainWindow.Window.Caption.Equals("MainWindow"));

            TextBox txtbox1 = wpfApp.MainWindow.Find.ByName<TextBox>("tbName");

            TextBox txtbox2 = wpfApp.MainWindow.Find.ByName<TextBox>("tbAddress");

            RadioButton radbutton1 = wpfApp.MainWindow.Find.ByName<RadioButton>("rbMale");

            ComboBox cbbox1 = wpfApp.MainWindow.Find.ByName<ComboBox>("countryddl");

            ComboBox cbbox2 = wpfApp.MainWindow.Find.ByName<ComboBox>("stateddl");

            CheckBox chkbox1 = wpfApp.MainWindow.Find.ByName<CheckBox>("chkTV");

            CheckBox chkbox2 = wpfApp.MainWindow.Find.ByName<CheckBox>("chkAC");

            DataGrid datagrid1 = wpfApp.MainWindow.Find.ByName<DataGrid>("dataGrid1");


Here I didn't create object for MessageBox.(WPF Automation UI (Telerik)).
Posted
Comments
Tomas Takac 24-Mar-15 5:20am    
Member 11527879 24-Mar-15 5:33am    
Of course, this time i am asking clearly.Please can You give me that solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900