コード例 #1
0
        public void GetChromeBrowserWithOptions()
        {
            var options = new ChromeOptions();

            options.AddArgument("-incognito");

            Assume.That(_driver.GetNuGetChromeDriver());
            _driver = WebDriverFactory.GetBrowser <ChromeDriver, ChromeOptions>(options, "http://rickcasady.blogspot.com/");
        }
コード例 #2
0
        public void SetUp()
        {
            int implicitWaitSec = Constants.IMPLICIT_WAIT_DEFAULT;
            var factory         = new WebDriverFactory();

            Driver = factory.GetBrowser(BrowserType.Chrome);

            Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(implicitWaitSec); //sets global implicit wait
            Driver.Manage().Cookies.DeleteAllCookies();
            Driver.Manage().Window.Maximize();
        }
コード例 #3
0
 public void GetInternetExplorerBrowser()
 {
     Assume.That(_driver.GetNuGetIEDriver());
     _driver = WebDriverFactory.GetBrowser <InternetExplorerDriver>("http://rickcasady.blogspot.com/");
     Assert.AreEqual(typeof(InternetExplorerDriver), _driver.GetType());
 }
コード例 #4
0
 public void GetChromeBrowser()
 {
     Assume.That(_driver.GetNuGetChromeDriver());
     _driver = WebDriverFactory.GetBrowser <ChromeDriver>("http://rickcasady.blogspot.com/");
     Assert.AreEqual(typeof(ChromeDriver), _driver.GetType());
 }
コード例 #5
0
 public void GetFirefoxBrowser64()
 {
     Assume.That(_driver.DownloadGeckoDriver());
     _driver = WebDriverFactory.GetBrowser <FirefoxDriver>("http://rickcasady.blogspot.com/");
     Assert.AreEqual(typeof(FirefoxDriver), _driver.GetType());
 }