Пример #1
0
        /// <summary>
        /// Clicks the specified button on the <see cref="MessageBox"/>.
        /// </summary>
        /// <param name="driver">The <see cref="WisejWebDriver"/> to use.</param>
        /// <param name="resultButton">The result button to click.</param>
        /// <param name="timeoutInSeconds">The number of seconds to wait for the MessageBox (default is 5).</param>
        public static void MessageBoxButtonClick(this WisejWebDriver driver, DialogResult resultButton,
                                                 int timeoutInSeconds = 5)
        {
            MessageBox messageBox = driver.GetMessageBox(true, timeoutInSeconds);

            messageBox.ButtonClick(resultButton);
        }
Пример #2
0
        /// <summary>
        /// Clicks the specified button on the <see cref="MessageBox"/> with the specified parameters.
        /// </summary>
        /// <param name="driver">The <see cref="WisejWebDriver"/> to use.</param>
        /// <param name="title">The title of message box to search for.</param>
        /// <param name="icon">The MessageBox icon to look for.</param>
        /// <param name="message">The message to search for.</param>
        /// <param name="resultButton">The result button to click.</param>
        /// <param name="timeoutInSeconds">The number of seconds to wait for the MessageBox (default is 5).</param>
        public static void MessageBoxButtonClick(this WisejWebDriver driver, string title,
                                                 MessageBoxIcon icon, string message, DialogResult resultButton, int timeoutInSeconds = 5)
        {
            MessageBox messageBox = driver.GetMessageBox(title, icon, message, true, timeoutInSeconds);

            messageBox.ButtonClick(resultButton);
        }