/** * Get id for placed order * * @param Checkout $fixture * @return string */ public function getOrderId(Checkout $fixture) { $continueShopping = $this->_rootElement->find($this->continueShopping); $this->_rootElement->waitUntil(function () use($continueShopping) { return $continueShopping->isVisible() ? true : null; }); if ($fixture->getCustomer()) { return $this->_rootElement->find($this->orderId, Locator::SELECTOR_CSS)->getText(); } else { return $this->getGuestOrderId(); } }