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

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
    <section name="AdminProductFormAttributeSection">
        <element name="createNewAttribute" type="button" selector="//button[@data-index='add_new_attribute_button']" timeout="30"/>
    </section>
    <section name="AdminProductFormNewAttributeSection">
        <element name="attributeLabel" type="button" selector="//input[@name='frontend_label[0]']" timeout="30"/>
        <element name="attributeType" type="select" selector="//select[@name='frontend_input']" timeout="30"/>
        <element name="addValue" type="button" selector="//button[@data-action='add_new_row']" timeout="30"/>
        <element name="optionViewName" type="text" selector="//table[@data-index='attribute_options_select']//span[contains(text(), '{{arg}}')]" parameterized="true" timeout="30"/>
        <element name="optionValue" type="input" selector="(//input[contains(@name, 'option[value]')])[{{arg}}]" timeout="30" parameterized="true"/>
        <element name="manageTitlesHeader" type="button" selector="//div[@class='fieldset-wrapper-title']//span[contains(text(), 'Manage Titles')]" timeout="30"/>
        <element name="manageTitlesViewName" type="text" selector="//div[@data-index='manage-titles']//span[contains(text(), '{{arg}}')]" timeout="30" parameterized="true"/>
        <element name="saveAttribute" type="button" selector="button#save" timeout="30"/>
        <element name="saveInNewSet" type="button" selector="button#saveInNewSet" timeout="10"/>
    </section>
    <section name="AdminProductFormNewAttributeAdvancedSection">
        <element name="sectionHeader" type="button" selector="div[data-index='advanced_fieldset']"/>
        <element name="defaultValue" type="textarea" selector="input[name='default_value_text']"/>
        <element name="scope" type="select" selector="//div[@data-index='advanced_fieldset']//select[@name='is_global']"/>
    </section>
    <section name="AdminProductFormNewAttributeStorefrontSection">
        <element name="sectionHeader" type="button" selector="div[data-index='front_fieldset']"/>
        <element name="useInSearch" type="checkbox" selector="div[data-index='is_searchable'] .admin__field-control label"/>
        <element name="searchWeight" type="select" selector="select[name='search_weight']"/>
    </section>
    <section name="AdminProductFormNewAttributeNewSetSection">
        <element name="setName" type="button" selector="//div[contains(@class, 'modal-inner-wrap') and .//*[contains(., 'Enter Name for New Attribute Set')]]//input[contains(@class, 'admin__control-text')]"/>
        <element name="accept" type="button" selector="//div[contains(@class, 'modal-inner-wrap') and .//*[contains(., 'Enter Name for New Attribute Set')]]//button[contains(@class, 'action-accept')]"/>
        <element name="cancel" type="button" selector="//div[contains(@class, 'modal-inner-wrap') and .//*[contains(., 'Enter Name for New Attribute Set')]]//button[contains(@class, 'action-dismiss')]"/>
    </section>
</sections>
