Step1:Create Unit Test Project With VS:
Step2:Add WebDriver Referene:
Step3:Initial FireFoxWebDriver
Step4:Simulator Search "Selenium in .net" in BaiDu
driver.Navigate().GoToUrl("http://baidu.com");
driver.FindElement(By.Id("wd")).SendKeys("Selenium in .Net");
driver.FindElement(By.Id("su")).Click();
Step5:Add geckodriver.exe to directory which app run, and firefox.exe path to Enivironment Path
Step6: Run Unit Test:OK
WebDriver In .Net
原文:http://www.cnblogs.com/jessicaxia/p/6296738.html