Esempio n. 1
0
        public void SaveFile(string fullPathName)
        {
            this.testContext.Logger.Trace("{wrapper}: Saving document to file: {name}", nameof(NotepadApp), fullPathName);

            var window = this.GetRootWindow();

            var fileMenu = window.FindElement <FileMenu>();

            fileMenu.ClickSave();
            var saveDialog = testContext.GetRoot("Save As");

            var edit = saveDialog.FindElement <Element>((By.LocalizedControlTypeProperty, "edit"), (By.NameProperty, "File name:"));

            edit.SendKeys(fullPathName);

            var saveButton = saveDialog.FindElement <ButtonElement>((By.NameProperty, "Save"));

            saveButton.Click();

            this.testContext.AwaitingService.WaitFor(TimeSpan.FromMilliseconds(1000));
        }