data binding

18 posts, 0 answers
  1. Arbind
    Arbind avatar
    8 posts
    Member since:
    Apr 2014

    Posted 31 May 2014 Link to this post

    my application -in the page some text is there say "hello" and in the same page there is a dropdown having diffrnt language.so if i ll select dutch then "Hello" will change to same lang.so in test i am verifying the word hello .i want data bind so i put a excel having two column language and word.in language US and dutch and in Word Hello and hello in dutch lang.  so test should go loke this 1. go to page by default value in drop down US lang 2.it will verify word hello 3.again return to page select dutch and verify the word(using data binding)....can u please send me a video how to do this test .
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 04 Jun 2014 Link to this post

    Hello Arbind,

    A video won't really help w/o having a sample website we can access that has the same type of language that your application uses so we can show you I've seen language selection as a row of buttons row of buttons as well as a drop down select for selecting language. How you data drive these is radically different.

    The approach is basically the same though.
    1. Create a test that logs in selects a language, verifies "Hello" text and ends
    2. Data drive that test with a data source that has two columns.
    3. The first column will be used to select the target language. What is contained in this column depends on the mechanics of how a language is selected in your application.
    4. The second column is the text for "Hello" for that target language
    5. Use these two columns in the two steps, one for selecting the language, the other for verifying the text.

    One thing you'll need to watch out for is to verify the Find Expression for the "Hello" element doesn't use Text in the find expression. If it does, when you change the language the test will fail with "element not found" simply because Test Studio is looking for the target element with the static text.



    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Dennis
    Dennis avatar
    18 posts
    Member since:
    May 2014

    Posted 10 Jun 2014 in reply to Cody Link to this post

    I'm just curious if there is a solution for this issue. I'm essentially trying to do the same thing, except I first log in to a site and then verify that specific text is displayed on the site based on the language selection. I think I need to do the text verification part in a loop to avoid logging in multiple times, but I'm not sure how to do that or if that's the right approach. Any suggestions will be appreciated!
  4. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 13 Jun 2014 Link to this post

    Hi Denis,

    Thank you for contacting us.

    To avoid multiple log ins just create a parent test which will contain two test as steps. The first one will be the log in and the second will the rest of the steps.

    When you run this test the log in test as step will be executed only once and the other test as many times as are the rows in the data source.

    Hope this helps.

    Regards,
    Boyan Boev
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  5. Dennis
    Dennis avatar
    18 posts
    Member since:
    May 2014

    Posted 13 Jun 2014 in reply to Boyan Boev Link to this post

    Hi Boyan,

    Your suggestion worked. Thank you!
  6. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 16 Jun 2014 Link to this post

    Hello Denis,

    Glad to hear that.

    If you need further help, please do not hesitate to contact us again.

    Regards,
    Boyan Boev
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  7. Jeannette
    Jeannette avatar
    2 posts
    Member since:
    Feb 2014

    Posted 16 Jul 2014 Link to this post

    A query on the same line.
    I am creating a test where I use a separate test to Login, then I have to verify values in 2 drop downs on my page. Each drop down has 6-7 values that I want to store in excel and data bind in the verification step.
    I don't want to create a separate test for each dropdown. I just want to use loop in someway that allows me to read those 6-7 values from the excel sheet and verify them on the application.
  8. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 17 Jul 2014 Link to this post

    Hello Jeannette,

    If you data bind the test as step (the test which verifies the dropdown) it will iterate as many times as the rows in the Excel sheet.

    You can use also datadriven find expression.

    In this case you don't need to create separate tests for every value.

    Hope this helps.

    Regards,
    Boyan Boev
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  9. Jeannette
    Jeannette avatar
    2 posts
    Member since:
    Feb 2014

    Posted 18 Jul 2014 Link to this post

    Thanks Boyan.

    I do not want to use test as step for sure. For datadriven find expression also If I bind it with excel field it will take one value at a time, that is 1 row for each iteration and thus does not solve my problem. I want to read all the rows in a single iteration.
  10. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 18 Jul 2014 Link to this post

    Hello Jeannette,

    The only way how you can read all rows during one iteration is with a Test as Step.

    Put the verification step in a separate test, data bind it and insert it as test as step in the parent test.

    In this case during a single iteration of the parent test the verification will execute as many times as are the rows in the Excel file.

    Please see this demonstration video. It navigates only one (one iteration), however it executes the second step 5 times.

    Let me know if this helps.

    Regards,
    Boyan Boev
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  11. dan
    dan avatar
    27 posts
    Member since:
    Jun 2016

    Posted 22 Jul Link to this post

    I have a similar application, but I'm not able to bind to the UI dropdown list. The step allows selection by Index, Text or Value, but the Step Properties does not show a property for Bindings, as would be the case if the field were a simple text field.

    Here's the HTML for the control..

    <div class="ms-crm-Inline-Edit ms-crm-Inline-OptionSet noScroll ms-crm-Inline-HideByZeroHeight" style="display: none;">

    <select id="new_preferredlanguage_i" class="ms-crm-SelectBox ms-crm-Inline-OptionSet-AutoOpen ms-crm-Inline-HideByZeroHeight-Ie7" attrname="new_preferredlanguage" defaultselected="100000000" attrpriv="7" title="" tabindex="-1" aria-labelledby="new_preferredlanguage_c new_preferredlanguage_w" size="3" style="height: 48px;" controlmode="normal">
    <option title=""></option>
    <option value="100000000" title="English">English</option>
    <option value="100000001" title="French">French</option>
    </select>

     

    Your help would be appreciated.

     

    Thanks,

    dan

  12. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 27 Jul Link to this post

    Hi Dan,

    I have found the root cause of this behavior. When you have size attribute of the drop down more than 1 it is considered as html list box and not as a drop down. 

    Unfortunately Test Studio does not have data binding property for list boxes. I have logged a feature request about this which you can track here.

    Until this is implemented to the product the workaround is to remove the size property from the drop down or set it to 1.

    Hope this helps.

    Regards,
    Boyan Boev
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  13. Sherjo
    Sherjo avatar
    3 posts
    Member since:
    Dec 2012

    Posted 28 Jul Link to this post

    Hi,

    I have a question similar to the question of Jeannette (Posted 16 Jul 2014)

    I want to check the contents of a drop down list using a list from an external file (text file, etc)

    my imagined work flow is:
    1.I have a text file that contains the data (which will be data binded):
    item 1
    item 2
    item 3
    2. The code will compare it by getting all the rows of a column(as a group) from the text file then compare it to the data from the drop down list

    I have tried this before but what happened was, data is retrieved one by one.

    Right now I use arrays to store data but I am having a hard time maintaining it, because every time there will be updates in the data, I have to recompile the code even though the code was unchanged.

    Is there a way to accomplish this in Test Studio?

    thanks.

  14. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 02 Aug Link to this post

    Hi Sherjo,

    Is it a regular HTML Select control? If so the only way to verify its options is via code. There is no other way.

    If it is not please send me a screen shot of its DOM.

    Thank you!

    Regards,
    Boyan Boev
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  15. dan
    dan avatar
    27 posts
    Member since:
    Jun 2016

    Posted 24 Aug in reply to Boyan Boev Link to this post

    Thanks Boyan. How do I remove the size property from the drop down or set it to 1?
  16. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 25 Aug Link to this post

    Hi Dan,

    This should be done by the developers of the site you are testing or by someone which has access to the source code of the site.

    Hope that helps.

    Regards,
    Boyan Boev
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  17. dan
    dan avatar
    27 posts
    Member since:
    Jun 2016

    Posted 25 Aug in reply to Boyan Boev Link to this post

    Thanks for your response, Boyan.

    We don't own that part of the code, so changing the property size is not a possible workaround for us.

    But, given your explanation of the root cause, I see this as a defect, rather than a missing feature. In the app I am creating scripts for, dropdowns are everywhere, and our approach is to avoid writing code as much as possible. Respectfully, I would encourage your team to give this issue a high priority and provide a fix/feature as quickly as possible.

    Thanks again for your help.

    dan

     

  18. Nikolay Petrov
    Admin
    Nikolay Petrov avatar
    81 posts

    Posted 30 Aug Link to this post

    Hi Dan,

    Thank you again for your feedback. It is very important for us. Once it is logged on our feedback portal it will be reviewed by our management and other customers may vote for it.

    Regards,
    Nikolay Petrov
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top