When I click on a button, a new page opens with a form and I need to fill a field on that page.
However, as soon as the page starts loading, behat attempts to populate the field that has not yet been loaded.
I would like to put an implicit wait to wait for the field to be displayed before attempting to populate it.
/**
* @Given que preencho corretamente os campos da tela
*/
public function quePreenchoCorretamenteOsCamposDaTela()
{
$faker = Faker\Factory::create();
$this->getPage()->findField('voucher_subject')->setValue($faker->text);
$this->getPage()->findField('voucher_nameRecipient')->setValue($faker->name);
}
Does anyone can help me?