public void TestFindByNameUsingRepo() { var button = new ButtonControl(); button.SystemUnderTestFromRepo("ok button using button name"); button.Click(); Assert.AreEqual("clicked", TextBoxOne.Text); }
public void TestFindByRootUsingRepo() { var button = new ButtonControl(); button.SystemUnderTestFromRepo("ok button using root automation id"); button.Click(); Assert.AreEqual("clicked", TextBoxOne.Text); }
public void TestFindByRoot() { var button = new ButtonControl(); button.SystemUnderTest(new ControlLocatorDef <FindControl>( () => new FindByAutomationId("Form1", true), () => new FindByName("Ok") )); button.Click(); Assert.AreEqual("clicked", TextBoxOne.Text); }
public void Test02_CalcResult() { var b = new ButtonControl(); b.SystemUnderTestFromRepo("4"); b.Click(); var textBox = new TextBoxControl(); textBox.SystemUnderTestFromRepo("result"); Assert.AreEqual("4", textBox.Name); }
public void TestFindByName() { var button = new ButtonControl(); button.SystemUnderTest(new ControlLocatorDef <FindControl>( () => new FindWindow("Demo Form"), () => new FindByName("Ok") )); button.Click(); Assert.AreEqual("clicked", TextBoxOne.Text); }
private static String Invoke(int processId, String method, IntPtr handle) { var textBox = new TextBoxControl(); textBox.SystemUnderTest(new ControlLocatorDef <FindControl>( () => new FindWindow("TestControlRig" + processId), () => new FindByAutomationId("method") )); textBox.Text = method; textBox.SystemUnderTest(new ControlLocatorDef <FindControl>( () => new FindWindow("TestControlRig" + processId), () => new FindByAutomationId("handle") )); textBox.Text = handle.ToString(); var button = new ButtonControl(); button.SystemUnderTest(new ControlLocatorDef <FindControl>( () => new FindWindow("TestControlRig" + processId), () => new FindByAutomationId("call") )); button.Click(); return(null); }