public void Case_FindChildrenNotExisted() { Window win = new Window(0); List<Window> windows = win.FindChildren("flakfl;jfsaljf",option:FilterOption.Title); Assert.IsNull(windows); }
public void Case_FindChildrenExisted() { Window win = new Window(0); List<Window> windows = win.FindChildren("记事本"); Assert.AreNotEqual(windows.Count, 0); bool existed = false; foreach(var w in windows) { if(w.Title.Contains("记事本")) { existed = true; } } Assert.IsTrue(existed,"目标窗口不存在"); }