Esempio n. 1
1
        public static NgWebDriver GetWebDriver()
        {
            var driver = new NgWebDriver(CreateDriver());
            driver.Manage().Timeouts().SetScriptTimeout(TimeSpan.FromSeconds(20));

            return driver;
        }
Esempio n. 2
0
 private static IWebDriver SetAngularProctractorDriver(IWebDriver driver)
 {
     driver = new NgWebDriver(driver);
     driver.Manage()
         .Timeouts()
         .SetPageLoadTimeout(TimeSpan.FromSeconds(Configuration.Instance.Selenium.ProtractorTimeOut));
     driver.Manage()
         .Timeouts()
         .SetScriptTimeout(TimeSpan.FromSeconds(Configuration.Instance.Selenium.ProtractorTimeOut));
     return driver;
 }
Esempio n. 3
0
 public void PeopleTitle()
 {
     using (IWebDriver wdriver = new NgWebDriver(new ChromeDriver(@"dependencies")))
     {
         wdriver.Manage().Timeouts().SetScriptTimeout(TimeSpan.FromSeconds(5));
         wdriver.Navigate().GoToUrl(baseUrl + "people");
         Assert.AreEqual(wdriver.Title, "ui.core: people");
         wdriver.Quit();
     }
 }
Esempio n. 4
0
        protected static NgWebDriver GetNewWebDriverInstance()
        {
            //string driverPath = @"C:\VSProjects\TMR.NET-V4.0\packages\WebDriver.IEDriver.2.44.0.1\tools";
            // Download the latest driver from http://selenium-release.storage.googleapis.com/index.html
            // This must be the 32 bit driver as the 64 bit driver (in the tools above) has an known issue/bug
            // with SendKeys taking forever.
            string driverPath = ConfigurationManager.AppSettings["driverpath"];
            NgWebDriver driver = new NgWebDriver(new InternetExplorerDriver(driverPath));
            TimeSpan ts = new TimeSpan(0, 0, 60);

            driver.Manage().Timeouts().SetPageLoadTimeout(ts);
            driver.Manage().Timeouts().SetScriptTimeout(ts);
            driver.Manage().Window.Maximize();
            return driver;
        }