3

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

Sahil
  • 121
  • 9
  • 3
    I let you here [a link](http://stackoverflow.com/questions/1357979/how-to-test-the-jquery-ui-slider-widget-with-selenium-ide) from a previous question related to this. I hope it helps you. – Fran Verona Mar 12 '11 at 12:43
  • 1
    Do you mean that you want to invoke the effect/slide transitions from a test, so that you can test some other feature of your software, or do you mean that you think the transitions may be broken and you want to write tests that you could contribute to the JQuery UI project? – Software Engineer Jun 08 '13 at 01:08

1 Answers1

1

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

Hasan Daghash
  • 1,681
  • 1
  • 17
  • 29