开发者

testing jQuery show(), hide() with Selenium IDE

I have a Javascript application that sends a request to yahoo Maps API and toggles a div tag's display with jQuery show() or hide() depending on the result.

I'm trying to write a test in Selenium IDE that will check the css display attribute of my div.

I understand the waitForCondition command but I'm having trouble working out how to check the above condition. I don't think Selenium IDE has jQuery built into it so I think my options are plain old javascript (shown in the previous link) or something like xPAth.

Can anyone give me some pointer开发者_JS百科s? Is my question clear enough?

Many thanks...


I used the code below in a waitForCondition to wait till a dynamic element was changed from display: none to display : block, shouldn't be hard to adapt it too your needs:

selenium.browserbot.getCurrentWindow().document.getElementById('articleDetails').style.display == 'block'
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜