/// <summary> /// Initializes a new instance of the PhantomJSDriver class using the specified <see cref="PhantomJSDriverService"/>. /// </summary> /// <param name="service">The <see cref="PhantomJSDriverService"/> to use.</param> /// <param name="options">The <see cref="PhantomJSOptions"/> used to initialize the driver.</param> /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param> public PhantomJSDriver(PhantomJSDriverService service, PhantomJSOptions options, TimeSpan commandTimeout) : base(new DriverServiceCommandExecutor(service, commandTimeout, false), options.ToCapabilities()) { // Add the custom commandInfo of PhantomJSDriver CommandInfo commandInfo = new CommandInfo(CommandInfo.PostCommand, "/session/{sessionId}/phantom/execute"); this.CommandExecutor.CommandInfoRepository.TryAddCommand(CommandExecutePhantomScript, commandInfo); }
private static ICapabilities ConvertOptionsToCapabilities(PhantomJSOptions options) { if (options == null) { throw new ArgumentNullException("options", "options must not be null"); } return(options.ToCapabilities()); }
/// <summary> /// Initializes a new instance of the PhantomJSDriver class using the specified <see cref="PhantomJSDriverService"/>. /// </summary> /// <param name="service">The <see cref="PhantomJSDriverService"/> to use.</param> /// <param name="options">The <see cref="PhantomJSOptions"/> used to initialize the driver.</param> /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param> public PhantomJSDriver(PhantomJSDriverService service, PhantomJSOptions options, TimeSpan commandTimeout) : base(new DriverServiceCommandExecutor(service, commandTimeout, false), options.ToCapabilities()) { }
private static ICapabilities ConvertOptionsToCapabilities(PhantomJSOptions options) { if (options == null) { throw new ArgumentNullException("options", "options must not be null"); } return options.ToCapabilities(); }
/// <summary> /// Initializes a new instance of the PhantomJSDriver class using the specified <see cref="PhantomJSDriverService"/>. /// </summary> /// <param name="service">The <see cref="PhantomJSDriverService"/> to use.</param> /// <param name="options">The <see cref="PhantomJSOptions"/> used to initialize the driver.</param> /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param> public PhantomJSDriver(PhantomJSDriverService service, PhantomJSOptions options, TimeSpan commandTimeout) : base(new DriverServiceCommandExecutor(service, commandTimeout, false), options.ToCapabilities()) { // Add the custom commandInfo of PhantomJSDriver CommandInfo commandInfo = new CommandInfo(CommandInfo.PostCommand, "/session/{sessionId}/phantom/execute"); CommandInfoRepository.Instance.TryAddAdditionalCommand(CommandExecutePhantomScript, commandInfo); }