Beispiel #1
0
        /// <summary>
        /// Change label of multiple choices and checkbox fields
        /// </summary>
        /// <param name="text">Text</param>
        public void ChangeLabel(string text)
        {
            HtmlTextArea textArea = EM.Forms.FormsBackend.TextArea
                                    .AssertIsPresent("Text area");

            textArea.ScrollToVisible();
            textArea.Focus();
            textArea.MouseClick();

            Manager.Current.Desktop.KeyBoard.KeyDown(System.Windows.Forms.Keys.Control);
            Manager.Current.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.A);
            Manager.Current.Desktop.KeyBoard.KeyUp(System.Windows.Forms.Keys.Control);
            Manager.Current.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.Delete);
            Manager.Current.Desktop.KeyBoard.TypeText(text);
        }
        /// <summary>
        /// Sets the new message for success.
        /// </summary>
        /// <param name="text">The text.</param>
        public void SetNewMessageForSuccess(string text)
        {
            ActiveBrowser.RefreshDomTree();
            HtmlTextArea messageArea = EM.Forms.FormsBackend.MessageArea
                                       .AssertIsPresent("Message area");

            messageArea.ScrollToVisible();
            messageArea.Focus();
            messageArea.MouseClick();

            Manager.Current.Desktop.KeyBoard.KeyDown(System.Windows.Forms.Keys.Control);
            Manager.Current.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.A);
            Manager.Current.Desktop.KeyBoard.KeyUp(System.Windows.Forms.Keys.Control);
            Manager.Current.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.Delete);
            Manager.Current.Desktop.KeyBoard.TypeText(text);
        }