/** * @Then /^je devrais voir le bouton "([^"]*)"$/ */ public function jeDevraisVoirLeBouton($arg1) { echo $arg1 . '|'; $this->session = $this->getCustomSession(); $page = $this->session->getPage(); $button = $page->findField($arg1); echo $button->getTagName() . '/'; if ($button == null) { throw new \Exception('Button "' . $arg1 . '" is not present on the page'); } }