Need to validate compiled document using C# selenium in VS



  • I am using selenium, C# at this point I am able to compile word document and then need to save as a pdf on desktop and then validate the links in the downloaded document with original parsed document, so what are different approaches to reach at this goal. Specific answers are most welcome. Using IE browser Thanks in advance



  • This is how I approached a similar situation in validating a PDF creation service. Convert the doc -> PDF using an automated method you control. This will be your oracle. Use your conversion process under test Do a file comparison between the two PDFs That method seems to me the easiest to implement, but it may not meet your test needs. Another approach could be to parse both the doc and the pdf, then use regex to grab the URLs and do a comparison. For parsing a Word doc, check out this stack overflow post: How to parse text from MS Word document to string For testing\parsing PDFs check out: jpdfunit and PDFParser



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2