<?xml version="1.0" encoding="UTF-8"?>
<!--
 /**
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
    <actionGroup name="GoToSpecifiedCreateProductPageActionGroup">
        <annotations>
            <description>Goes to the Admin Product grid page. Clicks on the Add Product toggle. Clicks on the provided Product Type.</description>
        </annotations>
        <arguments>
            <argument type="string" name="productType" defaultValue="simple"/>
        </arguments>

        <comment userInput="actionGroup:GoToSpecifiedCreateProductPageActionGroup" stepKey="actionGroupComment"/>
        <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
        <click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/>
        <click selector="{{AdminProductGridActionSection.addTypeProduct(productType)}}" stepKey="clickAddProduct"/>
        <waitForPageLoad stepKey="waitForFormToLoad"/>
    </actionGroup>
</actionGroups>
