/// <summary> /// Initializes a new instance of the ChromeBinary class using the given <see cref="ChromeProfile"/>, <see cref="ChromeExtension"/> and port value. /// </summary> /// <param name="profile">The Chrome profile to use.</param> /// <param name="extension">The extension to launch Chrome with.</param> /// <param name="port">The port on which to listen for commands.</param> internal ChromeBinary(ChromeProfile profile, ChromeExtension extension, int port) { this.profile = profile; this.extension = extension; if (port == 0) { this.FindFreePort(); } else { this.listeningPort = port; } }
/// <summary> /// Initializes a new instance of the ChromeDriver class using the specified profile and extension. /// </summary> /// <param name="profile">The profile to use.</param> /// <param name="extension">The extension to use.</param> private ChromeDriver(ChromeProfile profile, ChromeExtension extension) : base(new ChromeCommandExecutor(new ChromeBinary(profile, extension)), DesiredCapabilities.Chrome()) { }
/// <summary> /// Initializes a new instance of the ChromeBinary class using the given <see cref="ChromeProfile"/> and <see cref="ChromeExtension"/>. /// </summary> /// <param name="profile">The Chrome profile to use.</param> /// <param name="extension">The extension to launch Chrome with.</param> internal ChromeBinary(ChromeProfile profile, ChromeExtension extension) : this(profile, extension, 0) { }
/// <summary> /// Initializes a new instance of the ChromeBinary class using the given <see cref="ChromeProfile"/> and <see cref="extension"/>. /// </summary> /// <param name="profile">The Chrome profile to use.</param> /// <param name="extension">The extension to launch Chrome with.</param> internal ChromeBinary(ChromeProfile profile, ChromeExtension extension) { this.profile = profile; this.extension = extension; }
/// <summary> /// Initializes a new instance of the ChromeDriver class using the specified profile and extension. /// </summary> /// <param name="profile">The profile to use.</param> /// <param name="extension">The extension to use.</param> private ChromeDriver(ChromeProfile profile, ChromeExtension extension) { chromeBinary = new ChromeBinary(profile, extension); executor = new ChromeCommandExecutor(); StartClient(); }