/** * @When I go to the addressing step */ public function iGoToTheAddressingStep() { if ($this->selectShippingPage->isOpen()) { $this->selectShippingPage->changeAddressByStepLabel(); return; } if ($this->selectPaymentPage->isOpen()) { $this->selectPaymentPage->changeAddressByStepLabel(); return; } if ($this->completePage->isOpen()) { $this->completePage->changeAddress(); return; } throw new UnexpectedPageException('It is impossible to go to addressing step from current page.'); }