<?xml version="1.0" encoding="UTF-8"?>
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
    <actionGroup name="SelectPaymentMethodActionGroup">
        <annotations>
            <description>Selects the specified Payment Method on the Storefront Checkout page.</description>
        </annotations>
        <arguments>
            <argument name="MethodSelector" defaultValue="{{StorefrontStripePaymentMethodSection.checkPaymentMethodByName('Pay by Card')}}" type="string"/>
        </arguments>

        <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
        <waitForPageLoad stepKey="waitForPageLoad" time="10"/>
        <conditionalClick selector="{{MethodSelector}}" dependentSelector="{{MethodSelector}}" visible="true" stepKey="selectSpecifiedPaymentMethod"/>
        <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/>
    </actionGroup>
</actionGroups>
