<?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="AdminCreateRoleSection">
        <element name="create" type="button" selector="#add" timeout="30"/>
        <element name="name" type="button" selector="#role_name"/>
        <element name="password" type="input" selector="#current_password"/>
        <element name="resourceAccess" type="select" selector="[data-ui-id='adminhtml-user-editroles-tab-content-account'] [name='all']"/>
        <element name="resourceTree" type="block" selector="[data-ui-id='adminhtml-user-editroles-tab-content-account'] [data-role='resource-tree']"/>

        <element name="roleResources" type="button" selector="#role_info_tabs_account" timeout="30"/>
        <element name="roleResource" type="button" selector="#gws_is_all"/>
        <element name="roleResourceNew" type="button" selector="#all"/>
        <element name="resourceValue" type="button" selector="//*[text()='{{arg1}}']" parameterized="true"/>
        <element name="roleScope" type="button" selector="#all"/>
        <element name="roleScopeNew" type="button" selector="#gws_is_all"/>
        <element name="scopeValue" type="button" selector="//select[@id='all']/*[text()='{{arg2}}']" parameterized="true"/>
        <element name="website" type="checkbox" selector="//*[contains(text(), '{{arg3}}')]" parameterized="true"/>
        <element name="selectWebsite" type="checkbox" selector="//label[contains(text(), '{{websiteName}}')]/preceding-sibling::input" parameterized="true"/>
        <element name="save" type="button" selector="//button[@title='Save Role']" timeout="30"/>
        <element name="roleNameFilterTextField" type="input" selector="#permissionsUserRolesGrid_filter_role_name"/>
        <element name="searchButton" type="button" selector=".admin__data-grid-header button[title=Search]"/>
        <element name="searchResultFirstRow" type="text" selector=".data-grid>tbody>tr"/>
    </section>
</sections>
