I am running some functional tests for an application running using Symfony2 (2.1) and I am having a problem.
I have some parts of a website that load when a user clicks a link or other element, but these actions are performed using jQuery and $ .post calls. How can I get the symfony2 crawler to make these calls?
When I do something like this:
$link = $crawler->filter('ul.line_menu a')->eq(1)->link(); $crawler = $client->click($link);
The crawler gets the "href" of the "a" element and starts it, but the "href" is empty, and the "click ()" function is associated with this element, preventing the click action from "preventDefault ()".
Thanks everyone! :)
jquery symfony web-crawler phpunit functional-testing
user2324588
source share