采用SeleniumHq矿址的典型代码,但是,在节奏中,业绩是巨大的。
In release mode the entire test takes about 6 seconds (including launching and closing IE) In Debug mode it takes 65 seconds ?
抽样守则只是:
[Test]
public void testBrowser()
{
// Do something here
IWebDriver driver = new InternetExplorerDriver();
//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);
// TODO add wait
driver.Quit();
}
我在座谈了8点,表现相同。 出生地为罚款,但我的客户使用IE,因此我 st不去接受测试。 而且,如果我使用Selenium RC,我没有同样的问题。
NB - I m, using .Net 4 and the recent edition (2.16) of the web/63/7r.dll (running on a 64bitdows 7 Box)