Ejemplo n.º 1
0
        public dynamic Setcapabilites(WebBrowserConfiguration webBrowserConfiguration)
        {
            FirefoxOptions option = new FirefoxOptions();

            option.AddAdditionalCapability("name", TestContext.CurrentContext.Test.Name, true);
            return(option);
        }
Ejemplo n.º 2
0
        public dynamic Setcapabilites(WebBrowserConfiguration webBrowserConfiguration)
        {
            EdgeOptions option = new EdgeOptions();

            option.PageLoadStrategy = PageLoadStrategy.Eager;
            return(option);
        }
        public void BeforeScenario(WebBrowserConfiguration webBrowserConfiguration)

        {
            _driver = new DriverFactory(webBrowserConfiguration).Create();

            _objectContainer.RegisterInstanceAs <IWebDriver>(_driver);
        }
        public IWebDriver Resolve(WebBrowserConfiguration webBrowserConfiguration)
        {
            IWebDriver driver = new RemoteWebDriver(new Uri(webBrowserConfiguration.RemoteUri), SetCapabilities(webBrowserConfiguration));

            driver.Manage().Window.Maximize();
            return(driver);
        }
Ejemplo n.º 5
0
        public IWebDriver Resolve(WebBrowserConfiguration webBrowserConfiguration)
        {
            dynamic    option = Setcapabilites(webBrowserConfiguration);
            IWebDriver driver = new FirefoxDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), option);

            driver.Manage().Window.Maximize();
            return(driver);
        }
Ejemplo n.º 6
0
        public IWebDriver Resolve(WebBrowserConfiguration webBrowserConfiguration)
        {
            dynamic             option        = Setcapabilites(webBrowserConfiguration);
            ChromeDriverService driverService = ChromeDriverService.CreateDefaultService(Directory.GetCurrentDirectory());
            IWebDriver          driver        = new ChromeDriver(driverService, option);

            return(driver);
        }
Ejemplo n.º 7
0
        public dynamic SetCapabilities(WebBrowserConfiguration webBrowserConfiguration)
        {
            InternetExplorerOptions option = new InternetExplorerOptions();

            option.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
            option.AddAdditionalCapability("name", TestContext.CurrentContext.Test.Name, true);
            return(option);
        }
Ejemplo n.º 8
0
        public IWebDriver Resolve(WebBrowserConfiguration webBrowserConfiguration)
        {
            dynamic           option  = Setcapabilites(webBrowserConfiguration);
            EdgeDriverService service = EdgeDriverService.CreateDefaultService(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));

            System.Environment.SetEnvironmentVariable("webdriver.edge.driver", Assembly.GetEntryAssembly().Location);
            RemoteWebDriver driver = new EdgeDriver(service, option);

            driver.Manage().Window.Maximize();
            return(driver);
        }
        public dynamic SetCapabilities(WebBrowserConfiguration webBrowserConfiguration)
        {
            DriverOptions option = DriverFactory.DriverFactoryList.Find(item => item.Name == webBrowserConfiguration.BrowserName).SetCapabilities(webBrowserConfiguration);

            option.AddAdditionalCapability("enableVNC", true);
            option.AddAdditionalCapability("enableVideo", false);



            return(option);
        }
Ejemplo n.º 10
0
        public IWebDriver Resolve(WebBrowserConfiguration webBrowserConfiguration)
        {
            var options = SetCapabilities(webBrowserConfiguration);



            IWebDriver driver = new InternetExplorerDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), options);

            driver.Manage().Window.Maximize();
            return(driver);
        }
        public dynamic SetCapabilities(WebBrowserConfiguration webBrowserConfiguration)
        {
            ChromeOptions option = new ChromeOptions();

            option.AddArguments("start-maximized");
            option.AddAdditionalCapability("name", TestContext.CurrentContext.Test.Name, true);
            if (webBrowserConfiguration.HeadlessMode)
            {
                option.AddArguments("headless");
            }
            return(option);
        }
Ejemplo n.º 12
0
 public DriverFactory(WebBrowserConfiguration webBrowserConfiguration)
 {
     WebBrowserConfiguration = webBrowserConfiguration;
     Btype = webBrowserConfiguration.BrowserType;
 }