コード例 #1
0
        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");
        }
コード例 #2
0
ファイル: WiniumDriver.cs プロジェクト: Th3RD/Winium
 /// <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();
 }
コード例 #3
0
ファイル: WiniumDriver.cs プロジェクト: Th3RD/Winium
 /// <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)
 {
 }
コード例 #4
0
 public WiniumDriverCommandExecutor(WiniumDriverService driverService, TimeSpan commandTimeout)
 {
     this.service          = driverService;
     this.internalExecutor = CommandExecutorFactory.GetHttpCommandExecutor(driverService.ServiceUrl, commandTimeout);
 }
コード例 #5
0
 public WiniumDriverCommandExecutor(WiniumDriverService driverService, TimeSpan commandTimeout)
 {
     this.service = driverService;
     this.internalExecutor = CommandExecutorFactory.GetHttpCommandExecutor(driverService.ServiceUrl, commandTimeout);
 }
コード例 #6
0
 /// <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();
 }
コード例 #7
0
 /// <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)
 {
 }