开发者

Tapestry5.1+seleniumRc Ajax waitForAjax Request

开发者 https://www.devze.com 2022-12-16 04:22 出处:网络
Does anyone know how to do waitForAjaxRequest using seleniumRc (like waitForPageToLoad) on tapestry zone? I know there are alternatives like wait for certain element to appear and etc.

Does anyone know how to do waitForAjaxRequest using seleniumRc (like waitForPageToLoad) on tapestry zone? I know there are alternatives like wait for certain element to appear and etc.

I am seeking for a proper waitForAjaxRequest, and wish it work on different browsers as wel开发者_JS百科l.

I had tried browserbot, but no luck.


You can use waitForCondition:

selenium.waitForCondition("script", "timeout")

while timeout is in milliseconds (e.g. 30000) and the script is JavaScript that has to return true when the condition is fulfilled, e.g.

"var value = selenium.getText('foo'); value.match(/bar/);"

(See OpenQA Wiki for more information. Even though this links to a plugin that was in use with an older version of Selenium, waitForCondition is now part of SeleniumRC.)

0

精彩评论

暂无评论...
验证码 换一张
取 消