/** * Verify value in balance history grid. * * @param CustomerBalance $customerBalance * @return bool */ public function verifyCustomerBalanceGrid(CustomerBalance $customerBalance) { $moreInformation = $customerBalance->getComment(); $gridRowValue = './/tr[td[contains(.,"' . abs($customerBalance->getAmountDelta()) . '")]'; $customerNotified = $this->customerNotified[$customerBalance->getNotifyByEmail()]; $gridRowValue .= ' and td[contains(.,"' . $customerNotified . '")]'; if ($moreInformation) { $gridRowValue .= ' and td["' . sprintf($this->moreInformation, $moreInformation) . '"]'; } $gridRowValue .= ']'; $this->waitForElementVisible('.headings'); return $this->_rootElement->find($gridRowValue, Locator::SELECTOR_XPATH)->isVisible(); }