Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable animations when testing AngularJS app with protractor

I have some code in my AngularJS app which displays/hides some divs using animations like: $(el).fadeOut().

How can I disable the animations when testing with protractor using: http://api.jquery.com/jQuery.fx.off ? Can I somehow run that small piece o code in the browser directly from protractor?

like image 379
lucassp Avatar asked Sep 17 '13 14:09

lucassp


1 Answers

Found it:

var ptor = protractor.getInstance();
ptor.get("http://localhost:9000/");
ptor.driver.executeScript("$.fx.off = true;");
like image 57
lucassp Avatar answered Jan 01 '23 20:01

lucassp