问题
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?
回答1:
Found it:
var ptor = protractor.getInstance();
ptor.get("http://localhost:9000/");
ptor.driver.executeScript("$.fx.off = true;");
来源:https://stackoverflow.com/questions/18852713/disable-animations-when-testing-angularjs-app-with-protractor