在WatiN我怎么能等到回发完成.
例如:
// Postback response modifies update panel elsewhere on page
browser.Text("id").TypeText("asd");
// WatiN doesn't wait until postback is completed (what code should I replace it with?).
browser.WaitUntilComplete();
Run Code Online (Sandbox Code Playgroud)
gin*_*boy 11
您可以检查IE是否忙碌而不是完整.
while (((SHDocVw.InternetExplorerClass)(_ie.InternetExplorer)).Busy)
{
System.Threading.Thread.Sleep(2000);
}
Run Code Online (Sandbox Code Playgroud)
WaitUntilComplete无法识别ajax调用.请参阅本文(搜索WaitForAsyncPostBackToComplete),了解如何注入一些代码以使其工作:WatiN,Ajax和一些扩展方法
HTH,Jeroen
| 归档时间: |
|
| 查看次数: |
9537 次 |
| 最近记录: |