开发者

Selenium Test to test Jquery Effects ( Slide, fade)

We have a web application and we are using JQuery UI transition effects fade and slide. We would like to automate this using selenium.

Does any one has any suggestion how can I achieve this goal 开发者_开发问答?

Thanks


yes man this is doable , for example :

to test JQuery fade you should first understand the logic for this method, JQuery fadeOut() change the element display to display: none;

so you can get the element display value using JavascriptExecutor before runing jQuery fade and after , and check if the display value as you expected :

((JavascriptExecutor)driver).executeScript("return $('#yourElementSelector').attr('style')");

note : change #yourElementSelector to your css selector and save the Executor into var so you can test the value like so

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜