Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Ui.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Factory\Factory;
10 use Magento\Mtf\Fixture\FixtureInterface;
11 use Magento\Mtf\Handler\Ui as AbstractUi;
12 
17 class Ui extends AbstractUi implements CatalogProductSimpleInterface
18 {
25  public function persist(FixtureInterface $fixture = null)
26  {
27  Factory::getApp()->magentoBackendLoginUser();
28 
29  $createProductPage = Factory::getPageFactory()->getCatalogProductNew();
30  $createProductPage->open([
31  'type' => $fixture->getDataConfig()['create_url_params']['type'],
32  'set' => $fixture->getDataConfig()['create_url_params']['set'],
33  ]);
34 
35  $createProductPage->getProductForm()->fill($fixture);
36  $createProductPage->getFormPageActions()->save();
37  $createProductPage->getMessagesBlock()->waitSuccessMessage();
38  }
39 }
persist(FixtureInterface $fixture=null)
Definition: Ui.php:25