jeudi 19 novembre 2015

send form with Symfony crawler without save button (autosave function)

I'm writting functional test for symfony and I have problem with sending form on page, where is no any save button, only autosave function.

Usually I first located save button, fill form with data and than save

    // find the add button
    $saveButton = $crawler->filter('button.btn-save');

    // fill the form with data and submit
    $form = $saveButton->form();

    // submit empty form
    $crawler = $client->submit($form);

Thank you!

Aucun commentaire:

Enregistrer un commentaire