Forum Discussion
For Excel, I would start by using Excel via COM to access the sheet itself, especially if you're doing this kind of comparison and not a data driven test. See https://support.smartbear.com/testcomplete/docs/testing-with/advanced/working-with-external-data-sources/excel/working-via-com.html for beginning information on how to do that.
As for the PDF part, look into using PDFbox as described at https://support.smartbear.com/articles/testcomplete/testing-pdf-files-with-testcomplete
I'll leave it up to you to determine the specific implementation you choose to do the comparison but I would start with those two links and start building your code.
- manuelaneena6 years agoOccasional Contributor
Hi,
I got how to fetch data from excel and PDf.But I wanted to compare the data in excel and data in PDf.Is there is a possible way to do so
- tristaanogre6 years agoEsteemed Contributor
Yes... write code to do so. :-)
You read the stuff from the Excel, you read it from the PDF, and you do an "if then" to compare or some such thing. There is nothing "out of the box" to compare the two. You need to write that code yourself.- TanyaYatskovska6 years agoSmartBear Alumni (Retired)
Hi manuelaneena,
I agree with tristaanogre.
Only you know how the data in both files should be matched. Thus, you'll need to script a comparison algorithm that will read data from both sources and compare them as needed. TestComplete supports a set of languages. You can use the one you prefer:
https://support.smartbear.com/testcomplete/docs/scripting/selecting-the-scripting-language.html
Related Content
- 13 years agoglobus1987
- 8 months agoEgg
Recent Discussions
- 3 days agovladd1