Пример #1
0
        public static void Setup(TestContext context)
        {
            if (session == null)
            {
                // cleanup
                TearDown();
                //launch
                try
                {
                    session = Utility.CreateNewSession(TestSettings.RadarAppId);
                }
                catch { }
                Utility.SleepSeconds(3);

                session = Utility.AttachExistingSession("Ondulus Radar Launcher");
                //var pageSource = new PageSource(session);
                //string tree = pageSource.txtTree;
                //context.WriteLine(tree);
                string      id     = session.SessionId.ToString();
                var         source = session.PageSource;
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.LoadXml(source);

                var pageSource = new PageSource(source);

                string tree = pageSource.dumpNodeTree();
                context.WriteLine(tree);

                context.WriteLine("session process id =" + id);
                context.WriteLine("session source =" + source);
                //session.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5));
                //Assert.IsNotNull(session);
                //Assert.IsNotNull(session.SessionId);
            }
        }
Пример #2
0
        public string dumpNodeTreeTest([PexAssumeUnderTest] PageSource target)
        {
            string result = target.dumpNodeTree();

            return(result);
            // TODO: add assertions to method PageSourceTest.dumpNodeTreeTest(PageSource)
        }