/// <summary>
        /// Handles the command.
        /// </summary>
        /// <param name="driver">The driver used to execute the command.</param>
        /// <param name="locator">The first parameter to the command.</param>
        /// <param name="value">The second parameter to the command.</param>
        /// <returns>The result of the command.</returns>
        protected override object HandleSeleneseCommand(IWebDriver driver, string locator, string value)
        {
            string waitMessage = string.Format(CultureInfo.InvariantCulture, "Timed out waiting for {0}. Waited {1}", locator, value);
            PopupWaiter waiter = new PopupWaiter(driver, locator, this.windows);
            if (!string.IsNullOrEmpty(value))
            {
                long millis = long.Parse(value, CultureInfo.InvariantCulture);
                waiter.Wait(waitMessage, millis);
            }
            else
            {
                waiter.Wait(waitMessage);
            }

            return null;
        }
Beispiel #2
0
        /// <summary>
        /// Handles the command.
        /// </summary>
        /// <param name="driver">The driver used to execute the command.</param>
        /// <param name="locator">The first parameter to the command.</param>
        /// <param name="value">The second parameter to the command.</param>
        /// <returns>The result of the command.</returns>
        protected override object HandleSeleneseCommand(IWebDriver driver, string locator, string value)
        {
            string      waitMessage = string.Format(CultureInfo.InvariantCulture, "Timed out waiting for {0}. Waited {1}", locator, value);
            PopupWaiter waiter      = new PopupWaiter(driver, locator, this.windows);

            if (!string.IsNullOrEmpty(value))
            {
                long millis = long.Parse(value, CultureInfo.InvariantCulture);
                waiter.Wait(waitMessage, millis);
            }
            else
            {
                waiter.Wait(waitMessage);
            }

            return(null);
        }