Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
NewAttribute.php
Go to the documentation of this file.
1 <?php
8 
11 use Magento\Mtf\Client\Locator;
12 
17 {
23  private $newAttributeBlock = '//*[@data-role="modal"][.//input[@name="frontend_label[0]"]]';
24 
30  protected function getFormPageActionsBlock()
31  {
32  return $this->blockFactory->create(
33  \Magento\Backend\Test\Block\FormPageActions::class,
34  ['element' => $this->_rootElement->find($this->newAttributeBlock, Locator::SELECTOR_XPATH)]
35  );
36  }
37 
43  public function saveAttribute()
44  {
45  $this->getFormPageActionsBlock()->save();
46  }
47 }