有没有使用 selenium 2.0 Web 驱动程序与 .net 的教程/示例?
我尝试过搜索,但只能找到 java,没有找到有关 .net 和 selenium 2.0 Web 驱动程序的信息
这里的文档有一个 C# 示例:http://seleniumhq.org/docs/03_webdriver.html http://seleniumhq.org/docs/03_webdriver.html
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium;
class GoogleSuggest
{
static void Main(string[] args)
{
IWebDriver driver = new FirefoxDriver();
//Notice navigation is slightly different than the Java version
//This is because 'get' is a keyword in C#
driver.Navigate().GoToUrl("http://www.google.com/");
IWebElement query = driver.FindElement(By.Name("q"));
query.SendKeys("Cheese");
System.Console.WriteLine("Page title is: " + driver.Title);
driver.Quit();
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)