How can we verify the grid data (along with the headers) with an Excel file? I did data binding, but it didn't work. May be because I'm doing it wrong. So can anyone give me a walk through to create that test? (I'm new to Test Studio).
Please help
8 Answers, 1 is accepted
Data binding is the wrong approach. Data binding is mean to run the entire test once using one row of data contained in the file for that one iteration. If you have 20 rows, the test will run 20 times. It can't be used for verifying grid data.
Actually this type of verification is rather difficult and requires a lot of code. To help you get started we have this code sample for accessing an Excel file. We also have this code sample that demonstrates iterating through an HTML table. It will take more figuring out how to do your comparison, but that should at least point you in the right direction.
Regards,
Cody
Telerik
Hi Cody,
I got the similar question like Giridharan. Actually we are trying to migrate the data from excel file in to the web application. Not quite sure if Telerik supports it. I have ended up here while searching for the solution.
Above code sample links in your reply doesn't seems to be working. Could you please drive me to the right location where i can get the possible solution.
Hi Giridharan, wondering if you find any solution?
Thanks,
Neelima
Hi Neelima,
I didn't get a direct solution. But I guess you can achieve this by intense coding, since the we've the "Data" object.
What's your exact problem?
Giri
Thank you for contacting us.
Here are the correct links:
External log file
HTML table search and paging
Hope that helps.
Regards,
Boyan Boev
Telerik
Thank you for the reply Boyan, will give it a try. Is coding necessary to achieve this? Just wondering if this can be achieved by recording or is there any easy way that you can advise?
@Giridharan, We are trying to achieve data migration from an excel file into our web application. ​We have pick list fields in the forms. ​we can choose either single or multiple values depending on the type of the field. Now the excel file has multiple rows of data which i want to get them inserted in to the application.
To achieve this, I have recorded a test case ​for creating a new record, and then binded ​a sample excel file to the test case. until here everything seems simple. Now i have to retrieve the value from excel file then do a selection in the pick list field before saving the record.
Thanks,
Neelima
The code maybe not necessary.
Could you please send me a screen shot of that field and steps you have recorded so I can review them and give you some non coded solution.
Thank you!
Regards,
Boyan Boev
Telerik
Is it possible to either compare an excel table downloaded from a webpage to a SQL table and see if the values in each table match? If I am unable to do so using an excel document, then am I able to do the same but with an HTML table instead?
Unfortunately Test Studio does not have a built-in table comparison feature. Though anything is possible if you want to write it in code as a coded step in Test Studio. We can help you with iterating through the contents of an HTML table but assistance in iterating a SQL table or an Excel table is beyond the scope of Test Studio technical support. We do have this code sample for opening and reading an Excel file. That should help you get started.
Regards,
Cody
Telerik