private static WiniumDriverService CreateDefaultService(Type optionsType, string directory) { if (optionsType == typeof(DesktopOptions)) { return(WiniumDriverService.CreateDesktopService(directory)); } if (optionsType == typeof(StoreAppsOptions)) { return(WiniumDriverService.CreateStoreAppsService(directory)); } if (optionsType == typeof(SilverlightOptions)) { return(WiniumDriverService.CreateSilverlightService(directory)); } throw new ArgumentException( "Option type must be type of DesktopOptions, StoreAppsOptions or SilverlightOptions", "optionsType"); }
/// <summary> /// Initializes a new instance of the <see cref="WiniumDriver"/> class using the specified <see cref="WiniumDriverService"/>. /// </summary> /// <param name="service">The <see cref="WiniumDriverService"/> to use.</param> /// <param name="options">The <see cref="IWiniumOptions"/> object to be used with the Winium driver.</param> /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param> public WiniumDriver(WiniumDriverService service, IWiniumOptions options, TimeSpan commandTimeout) : base(new WiniumDriverCommandExecutor(service, commandTimeout), options.ToCapabilities()) { this.InitWiniumDriverCommands(); }
/// <summary> /// Initializes a new instance of the <see cref="WiniumDriver"/> class using the specified /// <see cref="WiniumDriverService"/> and options. /// </summary> /// <param name="service">The <see cref="WiniumDriverService"/> to use.</param> /// <param name="options">The <see cref="DesktopOptions"/> used to initialize the driver.</param> public WiniumDriver(WiniumDriverService service, IWiniumOptions options) : this(service, options, RemoteWebDriver.DefaultCommandTimeout) { }
public WiniumDriverCommandExecutor(WiniumDriverService driverService, TimeSpan commandTimeout) { this.service = driverService; this.internalExecutor = CommandExecutorFactory.GetHttpCommandExecutor(driverService.ServiceUrl, commandTimeout); }