Provides a way of executing Commands using the SafariDriver.
Inheritance: ICommandExecutor, IDisposable
Exemple #1
0
        /// <summary>
        /// Releases the unmanaged resources used by the <see cref="SafariDriver"/> and
        /// optionally releases the managed resources.
        /// </summary>
        /// <param name="disposing"><see langword="true"/> to release managed and resources;
        /// <see langword="false"/> to only release unmanaged resources.</param>
        protected override void Dispose(bool disposing)
        {
            SafariDriverCommandExecutor executor = this.CommandExecutor as SafariDriverCommandExecutor;

            if (executor != null)
            {
                executor.Dispose();
            }

            base.Dispose(disposing);
        }
        /// <summary>
        /// Starts the command executor, enabling communication with the browser.
        /// </summary>
        protected override void StartClient()
        {
            SafariDriverCommandExecutor executor = (SafariDriverCommandExecutor)this.CommandExecutor;

            try
            {
                executor.Start();
            }
            catch (IOException e)
            {
                throw new WebDriverException("Unexpected error launching Safari", e);
            }
        }
        /// <summary>
        /// Stops the command executor, ending further communication with the browser.
        /// </summary>
        protected override void StopClient()
        {
            SafariDriverCommandExecutor executor = (SafariDriverCommandExecutor)this.CommandExecutor;

            executor.Dispose();
        }