• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

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 で判定する。

例:PrototypeでAjaxリクエストを待つ
コマンド対象
clickfoo_button
waitForConditionselenium.browserbot.getCurrentWindow().Ajax.activeRequestCount == 05000

例:jQueryでAjaxリクエストを待つ
コマンド対象
clickfoo_button
waitForConditionselenium.browserbot.getCurrentWindow().jQuery.active == 05000

参考

  • http://d.hatena.ne.jp/cinquanta/20090501/1241675577
  • http://codelevy.com/2007/11/05/selenium-and-ajax-requests
posted by Png maiha on Thu 17 Sep 2009 at 10:41
Contents
Selenium IDE でAjax リクエストの終了を待つ
Comments
maiha: 追記)対応は約1営業日でした。チームの忙しさに応じて変動するとは思いますが、大体の目安情報とい... '10-4
maiha: なるほど。rails のログから実行したクエリを抜き出したいと思うことがよくありまして。 あ... '10-3
winebarrel: レポートありがとうございます。 削除できない件は修正しました。 SQLのparserはTC/... '10-2
maiha: なるほど。ありがとうございます! '10-2
ursm: Haml 2.2 以降はどこでも式展開が使えるようになったので、== は意味がなくなりました。... '10-2
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ