예제 #1
0
        public void ShouldUseTheFinderToDetermineIfItContainsAComponent()
        {
            var anElement = AutomationElement.RootElement;
            var finder = new Mock<IFindAutomationElements>();
            var window = new Window(anElement, finder.Object);

            finder.Setup(x => x.Contains(window, It.IsAny<PropertyCondition>())).Returns(true);
            Assert.IsTrue(window.Contains("pretended.to.find.this"));

            finder.Setup(x => x.Contains(window, It.IsAny<PropertyCondition>())).Returns(false);
            Assert.IsFalse(window.Contains("pretended.not.to.find.this"));
        }
예제 #2
0
파일: WaveformSteps.cs 프로젝트: undees/esc
 public void AWaveform()
 {
     var launcher = new ApplicationLauncher();
     app = launcher.Recycle("WaveformApp");
     win = app.FindWindow("Waveform");
 }