Exemple #1
0
        public void ShouldFindWindowByCondition()
        {
            Application application = new ApplicationLauncher().LaunchOrRecycle(EXAMPLE_APP_NAME, EXAMPLE_APP_PATH, Assert.Fail);
            Window      window      = application.FindWindow(new AndCondition(
                                                                 FindBy.WpfName("petShopWindow"), FindBy.ControlType(ControlType.Window)));

            Assert.IsNotNull(window.Element);
        }
Exemple #2
0
        public void ShouldProvideAContextMenuIfItExists()
        {
            var window      = LaunchPetShopWindow();
            var label       = window.Find <Label>(FindBy.WpfText("(Right-click here to copy an existing pet's details)"));
            var contextMenu = label
                              .InvokeContextMenu(FindBy.WpfName("copyPetMenu"));

            contextMenu.Select(contextMenu.Items[0]);
        }
Exemple #3
0
 public PetRegistrySteps ByCopying(string name)
 {
     // Need to click *off* the current text box to save the details
     // This is a Microsoft WPF thing, not a WiPFlash thing.
     _universe.Window.Find <TextBox>("petPriceInput").Element.SetFocus();
     _universe.Window.Find <TextBox>("petNameInput").Element.SetFocus();
     _universe.Window.Find <Label>("copyPetContextTarget")
     .InvokeContextMenu(FindBy.WpfName("copyPetMenu"))
     .Select("Pet[" + name + "]");
     return(this);
 }