public void BaseState() { _testApp = new ApplicationUnderTest("", "TestControlTests.exe"); _testApp.ShowDesktop(); _testApp.Terminate(); _testApp.Run(); }
public void BaseState() { _testApp = new ApplicationUnderTest("", "TestControlTests.exe"); _testApp.ShowDesktop(); _testApp.Run(); _testApp.WaitForCaption("Demo Form", 2); }
public void BaseState() { _testApp = new ApplicationUnderTest("", "TestControlTests.exe"); _testApp.Terminate(); _testApp.ShowDesktop(); _testApp.Run(); var repo = new ControlLocatorDefRepo("app"); repo.FindByCaption("Demo Form"); repo = new ControlLocatorDefRepo("ok button"); repo.FindUsing("app"); repo.FindByAutomationId("buttonOk"); repo = new ControlLocatorDefRepo("text box1"); repo.FindUsing("app"); repo.FindByAutomationId("textBox1"); repo = new ControlLocatorDefRepo("text box2"); repo.FindUsing("app"); repo.FindByAutomationId("textBox2"); repo = new ControlLocatorDefRepo("ok button using root automation id"); repo.FindByAutomationId("Form1", true); repo.FindByAutomationId("buttonOk"); repo = new ControlLocatorDefRepo("ok button using button name"); repo.FindUsing("app"); repo.FindByName("Ok"); }
public void TestCheckAppExists() { var demoApp = new ApplicationUnderTest("", ""); demoApp.ShowDesktop(); try { demoApp.RunOnce(); Assert.Fail("Test Application not there but test passing"); } catch { Assert.IsTrue(true); } }
public void TestLaunchWinFormDemoApp() { var demoApp = new ApplicationUnderTest("", "TestControlTests.exe"); demoApp.ShowDesktop(); demoApp.RunOnce(); if (demoApp.WaitForCaptionIfExists("***Demo Form-aaaaa", 2)) { Assert.Fail("this should not pass"); } if (demoApp.WaitForCaptionIfExists("Demo Form", 2)) { Assert.IsTrue(true); } else { Assert.Fail("unable to get demoapp window caption"); } demoApp.Terminate(); }