Disable animations when testing AngularJS app with

2019-06-19 01:30发布

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条回答
三岁会撩人
2楼-- · 2019-06-19 01:48

Found it:

var ptor = protractor.getInstance();
ptor.get("http://localhost:9000/");
ptor.driver.executeScript("$.fx.off = true;");
查看更多
登录 后发表回答