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

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

1 Answer 46 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gregory
Top achievements
Rank 1
Gregory asked on 04 Nov 2019, 08:58 PM

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!

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 06 Nov 2019, 03:12 PM

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!
Tags
General Discussions
Asked by
Gregory
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or