public void GivenCleanCalculator()
 {
     Manager.Current.LaunchNewBrowser(BrowserType.Chrome);
     browser = Manager.Current.ActiveBrowser;
     browser.NavigateTo(@"http://demos.telerik.com/silverlight/#Menu/Configurator");
     browser.WaitUntilReady();
     slApp = browser.SilverlightApps()[0];
 }
Пример #2
0
        public void TestWeb()
        {
            Settings mySettings = new Settings();
            mySettings.Web.DefaultBrowser = BrowserType.FireFox;
            mySettings.Web.EnableSilverlight = true;
            Manager myManager = new Manager(mySettings);
            myManager.Start();
            myManager.LaunchNewBrowser();
            // Navigate to the page
            //myManager.ActiveBrowser.NavigateTo(URL, false);

            // Launch a browser instance
            browser = Manager.Current.ActiveBrowser;
            browser.NavigateTo(URL, false);
            browser.WaitUntilReady();
            var aframes = browser.Frames;
            var adesktop = browser.Desktop;
            var time = browser.CommandTimeOut;
            var tree = browser.DomTree;
            var nodes = tree.Root.ChildNodes;
            var child = tree.Root.Children;

            // Get an instance of our Silverlight app.
            SilverlightApp app = browser.SilverlightApps()[0];

            var xmllist = app.Find.AllByType<Button>();
            var uilist = app.Find.AllByType<ArtOfTest.WebAii.Silverlight.UI.Button>();
            var idlist = app.Find.AllByAutomationId("radButton");

            var byname = app.Find.AllByName("EXPLORE ALL CONTROLS");
            var text = app.Find.AllByTextContent("EXPLORE ALL CONTROLS");
            app.RefreshVisualTrees();

            // Click the button
            var btn = app.FindName<ArtOfTest.WebAii.Silverlight.UI.Button>("EXPLORE ALL CONTROLS");
            btn.User.Click();

            // Verify the text
        }