17th Thu
Selenium IDE でAjax リクエストの終了を待つ
waitForCondition を使う
waitForCondition(script, timeout)
Arguments:
* script - the JavaScript snippet to run
* timeout - a timeout in milliseconds, after which this command will return with an error
停止条件は activeRequestCount で判定する。
|caption=例:PrototypeでAjaxリクエストを待つ
|
|コマンド,対象,値
|
|click,foo_button,
|waitForCondition,selenium.browserbot.getCurrentWindow().Ajax.activeRequestCount == 0, 5000
|caption=例:jQueryでAjaxリクエストを待つ
|
|コマンド,対象,値
|
|click,foo_button,
|waitForCondition,selenium.browserbot.getCurrentWindow().jQuery.active == 0, 5000
参考
posted by
maiha on Thu 17 Sep 2009 at 10:04 with 0 comments