Exemplo n.º 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"));
        }
Exemplo n.º 2
0
 public void AWaveform()
 {
     var launcher = new ApplicationLauncher();
     app = launcher.Recycle("WaveformApp");
     win = app.FindWindow("Waveform");
 }