Example #1
0
 /**
  * Click 'Add New Tax Rate' button
  *
  * @param Element $taxRateBlock
  * @return void
  */
 protected function clickAddNewButton(Element $taxRateBlock)
 {
     $addNewButton = $this->addNewButton;
     $taxRateBlock->waitUntil(function () use($taxRateBlock, $addNewButton) {
         return $taxRateBlock->find($addNewButton, Locator::SELECTOR_XPATH)->isVisible() ? true : null;
     });
     $taxRateBlock->find($this->addNewButton, Locator::SELECTOR_XPATH)->click();
 }
Example #2
0
 /**
  * Waiting until option in list is visible
  *
  * @param Element $element
  * @param string $value
  * @return void
  */
 protected function waitUntilOptionIsVisible($element, $value)
 {
     $element->waitUntil(function () use($element, $value) {
         $productSavedMessage = $element->find(sprintf($this->optionMaskElement, $value), Locator::SELECTOR_XPATH);
         return $productSavedMessage->isVisible() ? true : null;
     });
 }