Selenium: Ajax Testing

后端 未结 2 1276
南方客
南方客 2020-12-29 15:42

Please brief me about the Ajax testing with selenium RC. As in Ajax element not reflect on the view-source, but using firebug we can see the changes in HTML source code.

2条回答
  •  遥遥无期
    2020-12-29 16:16

    I got help on this from one article and with help of @Hannibal

    http://agilesoftwaretesting.com/?p=111

    JQuery: “jQuery.active”

    Prototype: “Ajax.activeRequestCount”

    Dojo: “dojo.io.XMLHTTPTransport.inFlight.length”

    So if there is Ajax call we can use second option.

    selenium.waitForCondition(
            "selenium.browserbot.getCurrentWindow().jQuery.active == 0",
            timeout);
    

提交回复
热议问题