withName($form_name)->create(); //Step two - Edit the form title $I->wantTo('Edit a form'); $I->login(); $I->amOnMailpoetPage('Forms'); $I->waitForText($form_name, 10); $I->clickItemRowActionByItemName($form_name, 'Edit'); $title_element = '[data-automation-id="mailpoet_form_name_input"]'; $I->waitForElement($title_element, 10); $I->seeInCurrentUrl('mailpoet-form-editor'); $I->fillField($title_element, $form_edited_name); $I->selectOptionInSelect2('My First List'); $I->click('[data-automation-id="save_form"]'); //Step three - assertions $I->waitForText('Saved! Add this form to a widget.', 10); $I->amOnMailpoetPage('Forms'); $I->waitForText($form_edited_name); } }