Help with comparing items from UI listbox to the list in SQL

2 posts, 0 answers
  1. Gregory
    Gregory avatar
    1 posts
    Member since:
    Oct 2018

    Posted 04 Nov Link to this post

    We have a web application with a Kendo Dropdown list box and want to compare the list of items in the UI to what the list should be in SQL.  Does anyone have a good solution for this or can point me in the right location/forum?

     

    Thanks so much!

  2. Elena
    Admin
    Elena avatar
    1155 posts

    Posted 06 Nov Link to this post

    Hi Gregory,

    As far as I understand you do not need to select any of the items in the dropdown, but only compare the list to the database entries. And if I have correctly understood the scenario, the best approach to accomplish this will be in a coded step. 

    The main idea is to locate the dropdown list in the DOM tree and compare it to the data from the database. The tricky part here will be to find out how the dropdown list appears in the DOM - there are different dropdown controls and some of them are using dynamic components. So, if this is the case, you may need to first toggle the dropdown in order to show the list and then locate in the DOM tree. 

    Next, you can use as a reference a coded sample which iterates through all cells in an HTML table and build a similar foreach cycle to go trough the listItems in the unorderedList for the dropdown items.

    To be able to compare the current item to any data from the database, you need to access this as well in code. I am not sure what database you are using, so I will share the examples we have - to connect an Oracle database, or a SQL one

    How elements are identified in Test Studio Testing Framework you can find in this article.

    Please, take your time to go through these notes and let me know if these are sufficient for your to cover the mentioned scenario. If there are any further questions, please do not hesitate to get back to me again. 

    Thank you for your cooperation in advance.

    Regards,
    Elena
    Progress Telerik

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