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
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.
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.