C# Webdriver在从服务器FireFox获取响应时停止响应

C# Webdriver在从服务器FireFox获取响应时停止响应,c#,selenium,webdriver,C#,Selenium,Webdriver,我在使用Firefoxdriver()时遇到问题。。当执行nant脚本以运行所有测试时,有时不执行测试用例。在一个随机测试用例中,由于Webdriver正在等待服务器的响应而失败,接下来的所有测试用例都失败 FF不再响应,Webdriver挂起 此外,当所有测试完成时,FF未关闭,但应关闭 我认为原因是webdriver无法处理来自服务器的请求 当手动单独执行所有测试时效果都很好,但是当所有测试都在脚本webdriver块中执行时 在我的情况下,页面正在响应 Firefox:11 Webdri

我在使用Firefoxdriver()时遇到问题。。当执行nant脚本以运行所有测试时,有时不执行测试用例。在一个随机测试用例中,由于Webdriver正在等待服务器的响应而失败,接下来的所有测试用例都失败

FF不再响应,Webdriver挂起

此外,当所有测试完成时,FF未关闭,但应关闭

我认为原因是webdriver无法处理来自服务器的请求

当手动单独执行所有测试时效果都很好,但是当所有测试都在脚本webdriver块中执行时

在我的情况下,页面正在响应

  • Firefox:11
  • Webdriver:2.0.19
  • Windowx XP
  • 南特姆布尼特加利奥
  • c#
你能帮忙吗

日志:

OpenQA.Selenium.WebDriverException:服务器没有响应url 在 OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest 请求)在 c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\HttpCommandExecutor.cs:line 115位于OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(命令 命令执行)在 c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\HttpCommandExecutor.cs:line 96 at OpenQA.Selenium.Firefox.Internal.ExtensionConnection.Execute(命令 命令执行)在 c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Firefox\Internal\ExtensionConnection.cs:line 128位于OpenQA.Selenium.Remote.RemoteWebDriver.Execute(DriverCommand driverCommandToExecute,Dictionary`2个参数) c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 795在OpenQA.Selenium.Remote.RemoteWebElement.get_Text()中 c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebElement.cs:line 96在网页上。TableGetRowData(字符串ctl_名称,字符串名称)


单击弹出窗口并单击“确定”后,它将在此方法“.DeductValue()”中停止。Webdriver阻塞,Webdriver等待来自服务器的响应,停止测试后FF正常工作,页面被重新加载。没有返回错误。当运行完整的TestFixture时,此测试不起作用,当我只运行此测试时,此测试工作正常


我在我的代码中添加wiat,在那里我执行页面刷新(按钮单击,链接单击,…) 但对于相同的测试用例,有时有效有时无效。
fopr 100测试用例我花了6天的时间来部分解决这个问题,我花了2天的时间,感觉像在石器时代

如果你需要帮助,我们需要代码。异常表明url无效。是,如果我停止运行测试并且FF被阻止,在停止测试后FF正常工作,可以单击。运行时的测试用例工作正常,Webdriver不会挂起。我与selenium 1 RC有相同的问题,现在Webdriver也有相同的问题,我正在测试aspx页面,当弹出窗口显示时,使用AJAX。对于exmaple,我选择Ruby-Watir,对于相同的测试用例,我没有任何问题。Selenium始终处于高潮状态,现在再次出现。web驱动程序配置文件保存到文件夹C:\Documents and Settings\danijelv\Local Settings\Temp\anonymous209841136.webdriver-profile中。配置文件fodler的大小为27,5MBI。为了格式和清晰度,请编辑您的原始问题。请不要将后续信息发布为答案,而是编辑您的问题。
[FixtureSetUp]
        public void FixtureSetup()
        {
       {

         FirefoxProfile profile = new FirefoxProfile();
                        driver = new FirefoxDriver(profile);



                        driver.Manage().Timeouts().ImplicitlyWait(new TimeSpan(Convert.ToInt16(timetowait)));
                        driver.Navigate().GoToUrl(seleniumBrowserUrl + "/admin/Login/Login.aspx");
}

     [Test]
            [Category(TestCategory.Smoke)]
            [Category(TestCategory.Smoke_Players)]
            [Metadata(UserStory.Name, UserStory.AP_Wallet)]
            public void DeductMoneyFromWallet()
            {
                struct_Wallet structWalet;

                structWalet.Amount = "100,10";
                structWalet.Direction = "Debit";
                structWalet.Type = "Manual";
                structWalet.reason = "Reason Deduct Money";
                structWalet.id = "";


                DefaultPage defpage = webdrivertester.DefaultPage();
                struct_PlayerGridRow player = defpage.ClickFindPlayers()
                    .PresButtonSearch()
                    .SelectFisrtPlayer()
                    .ClickEditWalet()
                    .getAmount()
                    .SelectDeductFromWallet()
                    .TypeInputAmount(structWalet.Amount)
                    .TypeInputReason(structWalet.reason)
                    .ClickSumbitWalet()
                    .ClickWaletPopupOK()
                    .DeductValue()
                    .AssertWallet()
                    .getPlayer();


                structWalet.Username = player.username;
                driver.Navigate().GoToUrl(seleniumBrowserUrl + "/admin/default.aspx");

                DefaultPage defpage1 = webdrivertester.DefaultPage();
                defpage1.ClickMoney()
                    .ClickFundsTransactionLog()
                    .TypeInputUsername(structWalet.Username)
                    .Clicksearch()
                    .ReadFirstrowData()
                    .AssertRowWithWallet(structWalet);

            }
TimeSpan ts = new TimeSpan(0, 0, 10);
            WebDriverWait wait = new WebDriverWait(WebDriver, ts);
            wait.Until(ExpectedConditions.ElementIsVisible(By.XPath(ctl_name)));