I have a web application that does not rely on jquery.
I perform functional tests thanks to (huge :)) casperjs.
Now I would like to use jquery in my tests. So I tried to enter it as indicated here http://casperjs.org/faq.html#faq-jquery . Well, that doesn't work.
Here is my code, if you can help me - is something wrong?
casper.start('http://localhost:8080/xxxxxx/xxxxxDialogTests.html'); casper.echo("page = " + casper.page); // -> it works, the page is there casper.page.injectJs("../tools/jquery-1.7.2.js"); casper.waitFor(function check() { return this.visible('#button_create'); }, function then() { this.click('#button_create'); casper.waitFor(function check() { return this.visible('#dialog_document_name'); }, function then() { console.log("element : ", this.evaluate(function () { var el = $("input#dialog_document_name"); return el; })); }); });
I deleted the test, as that is not the point ...
thanks!
source share