Ejemplo n.º 1
0
        protected override void BeginProcessing()
        {
            CheckCmdletParameters();

            switch (DriverName.ToUpper())
            {
            case SeHelper.DriverNameChrome:
            case SeHelper.DriverNameChrome2:
                Ch         = true;
                DriverType = Drivers.Chrome;
                break;

            case SeHelper.DriverNameFirefox:
            case SeHelper.DriverNameFirefox2:
                Ff         = true;
                DriverType = Drivers.Firefox;
                break;

            case SeHelper.DriverNameInternetExplorer:
            case SeHelper.DriverNameInternetExplorer2:
            case SeHelper.DriverNameInternetExplorer3:
            case SeHelper.DriverNameInternetExplorer4:
            case SeHelper.DriverNameInternetExplorer5:
            case SeHelper.DriverNameInternetExplorer6:
                Ie         = true;
                DriverType = Drivers.InternetExplorer;
                break;

            default:
                WriteError(
                    this,
                    "Could not determine the type of driver.",
                    "DriverType",
                    ErrorCategory.InvalidArgument,
                    true);
                break;
            }

            var command =
                new SeStartWebDriverCommand(this);

            //WebDriverFactory.Container.Resolve<SeStartWebDriverCommand>(new NamedParameter("cmdlet", this));
            command.Execute();
        }
Ejemplo n.º 2
0
        protected override void BeginProcessing()
        {
            this.CheckCmdletParameters();

            switch (this.DriverName.ToUpper()) {
                case SeHelper.driverNameChrome:
                case SeHelper.driverNameChrome2:
                    this.CH = true;
                    this.DriverType = Drivers.Chrome;
                    break;
                case SeHelper.driverNameFirefox:
                case SeHelper.driverNameFirefox2:
                    this.FF = true;
                    this.DriverType = Drivers.Firefox;
                    break;
                case SeHelper.driverNameInternetExplorer:
                case SeHelper.driverNameInternetExplorer2:
                case SeHelper.driverNameInternetExplorer3:
                case SeHelper.driverNameInternetExplorer4:
                case SeHelper.driverNameInternetExplorer5:
                case SeHelper.driverNameInternetExplorer6:
                    this.IE = true;
                    this.DriverType = Drivers.InternetExplorer;
                    break;
                default:
                    this.WriteError(
                        this,
                        "Could not determine the type of driver.",
                        "DriverType",
                        ErrorCategory.InvalidArgument,
                        true);
                    break;
            }

            SeStartWebDriverCommand command =
                new SeStartWebDriverCommand(this);
                //WebDriverFactory.Container.Resolve<SeStartWebDriverCommand>(new NamedParameter("cmdlet", this));
            command.Execute();
        }