I try to check the navigation menu by making CasperJS a mouse click on various parts of the menu. After the first two clicks, Slimerjs hangs, and after 5 minutes I get the following error: addons.repository WARN cacheEnabled: Failed to get pref: extensions.getAddons.cache.enabled ".
This is how I run my test:
casperjs test tests / --engine = slimerjs --verbose
And here is my code:
casper.test.begin('Deal menu is working as expected', 2, function suite(test) {
casper.start('http://username:password@somesite/section/home', function() {
test.assertTitle('Main Page', 'Main Page loaded');
casper.capture('mainPage.png');
});
casper.then(function() {
this.click('#menuId1');
this.wait(2000, function() {
test.assertTitle('Menu 1', 'Menu 1 loaded');
casper.capture('pic1.png');
});
});
casper.then(function() {
this.click('#menuId2');
this.wait(2000, function() {
test.assertTitle('Menu 2', 'Menu 2 loaded');
casper.capture('pic2.png');
});
});
casper.then(function() {
this.click('#menuId3');
this.wait(2000, function() {
test.assertTitle('Menu 3', 'Menu 3 loaded');
casper.capture('pic3.png');
});
});
casper.run(function() {
test.done();
});
});
After the second, casper.thenit freezes, and after a while it gives me the error message mentioned above. I also checked firefox (version 39) that extensions.getAddons.cache.enabled is true.
When I run the same test with PhantomJS, it works fine. Any ideas?