初始化Selenium WebDriver

//My Usings
using OpenQA.Selenium.IE;
using OpenQA.Selenium;
using OpenQA.Selenium.Support.UI;
using Selenium;
 
#region Initialized the WebDriver and Backup selenium
 
            //Solve the security issue
            InternetExplorerOptions options = new InternetExplorerOptions();
            options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
 
            //初始化:Selenium, WebDriver
            IWebDriver webDriver = new InternetExplorerDriver(options);
 
            ISelenium selenium;
            selenium = new WebDriverBackedSelenium(webDriver, "http://www.google.com");
            selenium.Start();
 
 
#endregion
 
#region Release System Source
 
            webDriver.Close();
            webDriver.Quit();
 
#endregion


你可能感兴趣的:(selenium,webdriver)