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