XML Code Data binding

4 posts, 0 answers
  1. Marshall
    Marshall avatar
    4 posts
    Member since:
    Oct 2016

    Posted 27 Oct Link to this post

    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"?
  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 01 Nov Link to this post

    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!
  3. Marshall
    Marshall avatar
    4 posts
    Member since:
    Oct 2016

    Posted 01 Nov in reply to Boyan Boev Link to this post

    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?

  4. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 04 Nov Link to this post

    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!
Back to Top