/** * Verify product options * * @param FixtureInterface $product * @return bool */ public function verifyProductOptions(FixtureInterface $product) { $attributes = $product->getConfigurableOptions(); foreach ($attributes as $attributeName => $attribute) { foreach ($attribute as $optionName) { $option = $this->_rootElement->find('//*[*[@class="field configurable required"]//span[text()="' . $attributeName . '"]]//select/option[contains(text(), "' . $optionName . '")]', Locator::SELECTOR_XPATH); if (!$option->isVisible()) { return false; } } } return true; }