OpenQA.Selenium.Chrome.ChromeBinary.IncrementStartWaitInterval C# (CSharp) Method

IncrementStartWaitInterval() public static method

Increases the wait time
public static IncrementStartWaitInterval ( int diff ) : void
diff int How long to wait
return void
        public static void IncrementStartWaitInterval(int diff)
        {
            linearStartWaitCoefficient += diff;
        }

Usage Example

        /// <summary>
        /// Starts the connection to the browser extension.
        /// </summary>
        public void Start()
        {
            int retries = MaxStartRetries;

            while (retries > 0 && !HasClient)
            {
                Stop();
                try
                {
                    StartListening();
                    executorBinary.Start();
                }
                catch (IOException e)
                {
                    throw new WebDriverException("Could not start client", e);
                }

                if (!HasClient)
                {
                    // In case this attempt fails, we increment how long we wait before sending a command
                    ChromeBinary.IncrementStartWaitInterval(1);
                }

                retries--;
            }

            // The last one attempt succeeded, so we reduce back to that time
            // chromeBinary.IncrementBackoffBy(-1);
            if (!HasClient)
            {
                Stop();
                throw new FatalChromeException("Cannot create chrome driver");
            }
        }