<?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="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup">
        <annotations>
            <description>Fills the Product Name, Price From and Price To fields on the Storefront 'Advanced Search' page. Clicks on the Submit button.</description>
        </annotations>
        <arguments>
            <argument name="name" type="string"/>
            <argument name="priceFrom" type="string"/>
            <argument name="priceTo" type="string"/>
        </arguments>

        <fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.ProductName}}" userInput="{{name}}" stepKey="fillName"/>
        <fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceFrom}}" userInput="{{priceFrom}}" stepKey="fillPriceFrom"/>
        <fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceTo}}" userInput="{{priceTo}}" stepKey="fillPriceTo"/>
        <click selector="{{StorefrontCatalogSearchAdvancedFormSection.SubmitButton}}" stepKey="clickSubmit"/>
        <waitForPageLoad stepKey="waitForPageLoad"/>
    </actionGroup>
</actionGroups>
