WebDriver In .Net
时间:2017-01-18 15:10:57
收藏:0
阅读:281
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();
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
原文:http://www.cnblogs.com/jessicaxia/p/6296738.html
评论(0)