Tag: 阿贾克

等待一个Ajax调用与Selenium 2networking驱动程序完成

我使用selenium2 Web驱动程序来testing使用AJAX的用户界面。 有没有办法使驱动程序等待一点,这样的Ajax请求将完成 基本上我有这个: d.FindElement(By.XPath("//div[8]/div[3]/div/button")).Click(); // this^ click triggers 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);