<?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="OpenSwatchMenuByIndexActionGroup">
        <annotations>
            <description>Options the Swatch Menu based on the provided Index.</description>
        </annotations>
        <arguments>
            <argument name="index" type="string" defaultValue="0"/>
        </arguments>

        <!-- I had to use executeJS to perform the click to get around the use of CSS ::before and ::after -->
        <executeJS function="jQuery('#swatch_window_option_option_{{index}}').click()" stepKey="clickSwatch1"/>
    </actionGroup>
</actionGroups>
