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