This is a migrated thread and some comments may be shown as answers.

XML Code Data binding

3 Answers 100 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marshall
Top achievements
Rank 1
Marshall asked on 27 Oct 2016, 09:26 AM
I have a question about XML Data binding. I have this xml file:
<generateCoupons>
        <backend>
            <successful>
                <generateCouponsSuccessful>
                    <name>name</name>
                    <description>descr</description>
                    <disabled>false</disabled>
                    <validSince>27.10.2016</validSince>
                    <validUntil>20.11.2017</validUntil>
                    <minPriceOrder>1400</minPriceOrder>
                    <UsePercentForDiscount>false</UsePercentForDiscount>
                    <discountPrice>300</discountPrice>
                    <masks>
                        <mask>
                            <name>Letters</name>
                        </mask>
                        <mask>
                            <name>Random numbers</name>
                        </mask>
                    </masks>
                </generateCouponsSuccessful>
            </successful>
        </backend>
    </generateCoupons>

When I go to Telerik test studio and bind my test to the table "generateCouponsSuccessful", how can I get the values of the element "mask"?

3 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 01 Nov 2016, 08:53 AM
Hello Marshal,

Since mask field is nested you should bind the test directly to it. See the attached screen shot.

Let me know if that helps.

Regards,
Boyan Boev
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Marshall
Top achievements
Rank 1
answered on 01 Nov 2016, 10:48 AM

But I want to work with all these nested items under the element generateCouponsSuccessful in one test. My form on the web page need all these items.

<name>name</name>
                    <description>descr</description>
                    <disabled>false</disabled>
                    <validSince>27.10.2016</validSince>
                    <validUntil>20.11.2017</validUntil>
                    <minPriceOrder>1400</minPriceOrder>
                    <UsePercentForDiscount>false</UsePercentForDiscount>
                    <discountPrice>300</discountPrice>
                    <masks>
                        <mask>
                            <name>Letters</name>
                        </mask>
                        <mask>
                            <name>Random numbers</name>
                        </mask>
                    </masks>

Is it possible?

0
Boyan Boev
Telerik team
answered on 04 Nov 2016, 07:59 AM
Hi Marshal,

Every tag is counted as a separate column, so no unfortunately this is not possible.

If it is possible to change the structure of the XML file so the mark is not nested then it should work as you expect.

Thank you for your understandings.

Regards,
Boyan Boev
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Marshall
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Marshall
Top achievements
Rank 1
Share this question
or