1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?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="AdminCartPriceRulesFormSection">
<element name="save" type="button" selector="#save" timeout="30"/>
<element name="saveAndContinue" type="button" selector="#save_and_continue" timeout="30"/>
<element name="delete" type="button" selector="#delete" timeout="30"/>
<element name="modalAcceptButton" type="button" selector="button.action-accept" timeout="30"/>
<!-- Rule Information (the main form on the page) -->
<element name="ruleInformationHeader" type="button" selector="div[data-index='rule_information']" timeout="30"/>
<element name="ruleName" type="input" selector="input[name='name']"/>
<element name="websites" type="multiselect" selector="select[name='website_ids']"/>
<element name="customerGroups" type="multiselect" selector="select[name='customer_group_ids']"/>
<element name="coupon" type="select" selector="select[name='coupon_type']"/>
<element name="couponCode" type="input" selector="input[name='coupon_code']"/>
<element name="useAutoGeneration" type="checkbox" selector="input[name='use_auto_generation']"/>
<element name="fromDate" type="input" selector="input[name='from_date']"/>
<element name="toDate" type="input" selector="input[name='to_date']"/>
<element name="userPerCoupon" type="input" selector="//input[@name='uses_per_coupon']"/>
<element name="userPerCustomer" type="input" selector="//input[@name='uses_per_customer']"/>
<element name="priority" type="input" selector="//*[@name='sort_order']"/>
<!-- Conditions sub-form -->
<element name="conditionsHeader" type="button" selector="div[data-index='conditions']" timeout="30"/>
<element name="conditionsHeaderOpen" type="button" selector="div[data-index='conditions'] div[data-state-collapsible='open']" timeout="30"/>
<element name="conditionsValue" type="input" selector=".rule-param-edit input"/>
<element name="conditionsOperator" type="select" selector=".rule-param-edit select"/>
<element name="addCondition" type="button" selector="//*[@id='conditions__{{arg}}__children']//span" parameterized="true"/>
<element name="ruleCondition" type="select" selector="rule[conditions][{{arg}}][new_child]" parameterized="true"/>
<element name="ruleParameter" type="text" selector="//span[@class='rule-param']/a[contains(text(), '{{arg}}')]" parameterized="true"/>
<element name="ruleParameterSelect" type="select" selector="rule[conditions][{{arg}}][operator]" parameterized="true"/>
<element name="ruleParameterInput" type="input" selector="rule[conditions][{{arg}}][value]" parameterized="true"/>
<element name="openChooser" type="button" selector="//label[@for='conditions__{{arg}}__value']" parameterized="true"/>
<element name="categoryCheckbox" type="checkbox" selector="//span[contains(text(), '{{arg}}')]/parent::a/preceding-sibling::input[@type='checkbox']" parameterized="true"/>
<!-- Actions sub-form -->
<element name="actionsTab" type="text" selector="//div[@data-index='actions']//span[contains(.,'Actions')][1]"/>
<element name="actionsHeader" type="button" selector="div[data-index='actions']" timeout="30"/>
<element name="actionsHeaderOpen" type="button" selector="div[data-index='actions'] div[data-state-collapsible='open']" timeout="30"/>
<element name="apply" type="select" selector="select[name='simple_action']"/>
<element name="conditions" type="button" selector=".rule-param.rule-param-new-child > a"/>
<element name="childAttribute" type="select" selector="//select[contains(@name, 'new_child')]"/>
<element name="condition" type="text" selector="//span[@class='rule-param']/a[text()='{{arg}}']" parameterized="true"/>
<element name="operator" type="select" selector="//select[contains(@name, '[operator]')]"/>
<element name="option" type="select" selector="//ul[@class='rule-param-children']//select[contains(@name, '[value]')]"/>
<element name="actionValue" type="input" selector=".rule-param-edit input"/>
<element name="actionOperator" type="select" selector=".rule-param-edit select"/>
<element name="applyDiscountToShipping" type="checkbox" selector="input[name='apply_to_shipping']"/>
<element name="applyDiscountToShippingLabel" type="checkbox" selector="input[name='apply_to_shipping']+label"/>
<element name="discountAmount" type="input" selector="input[name='discount_amount']"/>
<element name="discountStep" type="input" selector="input[name='discount_step']"/>
<element name="addRewardPoints" type="input" selector="input[name='extension_attributes[reward_points_delta]']"/>
<element name="freeShipping" type="select" selector="//select[@name='simple_free_shipping']"/>
<!-- Manage Coupon Codes sub-form -->
<element name="manageCouponCodesHeader" type="button" selector="div[data-index='manage_coupon_codes']" timeout="30"/>
<element name="successMessage" type="text" selector="div.message.message-success.success"/>
<element name="couponQty" type="input" selector="#coupons_qty"/>
<element name="generateCouponsButton" type="button" selector="#coupons_generate_button" timeout="30"/>
<element name="generatedCouponByIndex" type="text" selector="#couponCodesGrid_table > tbody > tr:nth-child({{var}}) > td.col-code" parameterized="true"/>
</section>
</sections>