public static void Setup(TestContext ctx)
        {
            app.RunOnce();
            if (app.WaitForCaptionIfExists("Demo Form", 20))
            {
                Assert.IsTrue(true);
            }
            else
            {
                Assert.Fail("unable to get window caption");
            }

            //locate the control as like any other .NET Control
            aBrowser = new WebBrowserControl("ie");
            aBrowser.SystemUnderTest(new ControlLocatorDef <FindControl>(
                                         () => new FindByAutomationId("Form1", true),
                                         () => new FindChildByCaption(null, "Internet Explorer_Server")
                                         ));
            Assert.IsTrue(aBrowser.IsVisible);
        }
Beispiel #2
0
        public static void Setup(TestContext ctx)
        {
            app.RunOnce();
            if (app.WaitForCaptionIfExists("Google", 20))
            {
                Assert.IsTrue(true);
            }
            else
            {
                Assert.Fail("unable to get window caption");
            }

            //locate the control as like any other .NET Control
            aBrowser = new WebBrowserControl("chrome");
            aBrowser.SystemUnderTest(new ControlLocatorDef <FindControl>(
                                         () => new FindByAutomationId("Form1", true),
                                         () => new FindByName("Chrome Legacy Window")
                                         ));
            Assert.IsTrue(aBrowser.IsVisible);
        }