【发布时间】:2011-09-06 06:47:55
【问题描述】:
我正在使用 Selenium 2 WebDriver 来测试使用 AJAX 的 UI。
有没有办法让驱动程序等待 Ajax 请求完成。
基本上我有这个:
d.FindElement(By.XPath("//div[8]/div[3]/div/button")).Click();
// This click trigger an ajax request which will fill the below ID with content.
// So I need to make it wait for a bit.
Assert.IsNotEmpty(d.FindElement(By.Id("Hobbies")).Text);
【问题讨论】:
-
这是什么语言?
-
@jcollum 它是 C#
标签: c# ajax selenium selenium-webdriver