Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
OpenProductsOnFrontendStep.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Client\BrowserInterface;
10 use Magento\Mtf\TestStep\TestStepInterface;
11 
15 class OpenProductsOnFrontendStep implements TestStepInterface
16 {
22  protected $products = [];
23 
29  protected $browser;
30 
38  public function __construct(array $products, BrowserInterface $browser)
39  {
40  $this->products = $products;
41  $this->browser = $browser;
42  }
43 
49  public function run()
50  {
51  foreach ($this->products as $product) {
52  $this->browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
53  }
54  }
55 }