Esempio n. 1
0
        public void testInitialize()
        {
            var capabilitiesInternet = new OpenQA.Selenium.Remote.DesiredCapabilities();

            capabilitiesInternet.SetCapability("ignoreProtectedModeSettings", true);
            WebDriver = new ChromeDriver(@"C:\chromedriver_win32\");
        }
Esempio n. 2
0
        /// <summary>
        ///   Yahoo overrides standard DOM event methods (i.e. onclick("", ...)) causing webdriver to trigger unexpected memory protection exceptions 
        /// </summary>
        public static IWebDriver CreateWithDefaultProperties()
        {
            var caps = new OpenQA.Selenium.Remote.DesiredCapabilities();
            caps.SetCapability(OpenQA.Selenium.Remote.CapabilityType.HasNativeEvents, false);
            
            var driver = new FirefoxDriver(caps);
            driver.Manage().Window.Maximize();
            driver.Manage().Cookies.DeleteAllCookies();

            return driver;
        }
Esempio n. 3
0
        public void How_To_Handle_Https_Certifications()
        {
            OpenQA.Selenium.Remote.DesiredCapabilities cap = new OpenQA.Selenium.Remote.DesiredCapabilities();
            cap.SetCapability("Aceept_ssl_certs", "true");

            ChromeOptions options = new ChromeOptions();

            options.AddAdditionalCapability("Aceept_ssl_certs", "true");
            options.AddArgument("start-maximized");                                         //Opens Chrome in maximize mode
            options.AddArgument("incognito ");                                              //Opens Chrome in incognito mode
            options.AddArgument("headless");                                                //Opens Chrome in headless mode
            options.AddAdditionalCapability("download.default_directory", "Download Path"); //Change the download path
            //TestSetup.driver = new ChromeDriver(@"C:\Users\Gitesh\source\repos\UnitTestProject1\packages\Selenium.Chrome.WebDriver.2.33\driver", options);
        }
Esempio n. 4
0
 public void testInitialize()
 {
     var capabilitiesInternet = new OpenQA.Selenium.Remote.DesiredCapabilities();
     capabilitiesInternet.SetCapability("ignoreProtectedModeSettings", true);
     WebDriver = new ChromeDriver(@"C:\chromedriver_win32\");
 }