Selenium test to test jQuery effects (slide, fade)

We have a web application and we use jQuery UI transition effects, fading and slides. We would like to automate this with selenium.

Does anyone have any suggestions on how I can achieve this?

thank

+3
source share
1 answer

yes man this is doable, for example:

To test jQuery fade, you must first understand the logic of this method, jQuery fadeOut()change the display of the element todisplay: none;

so that you can get the value of the element displayusing JavascriptExecutor jQuery before fadeand after, and check if the value displaywas as you expected:

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

note: #yourElementSelector css Executor var, :

+1

All Articles