开发者

Selenium Test to test Jquery Effects ( Slide, fade)

开发者 https://www.devze.com 2023-02-16 14:56 出处:网络
We have a web application and we are using JQuery UI transition effects fade and slide. We would like to automate this using selenium.

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

精彩评论

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

关注公众号