1

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

2
  • 1
    I am very confused at what the question is. Can you expand? What do you mean by "compile word doc"? When you're talking about saving as pdf do you mean saving from a browser somehow? If you are talking about comparing links in a word doc to links in a pdf then Selenium is definitely not the right tool for the job since it will only automate interacting with web elements within a browser.
    – Sam Woods
    Nov 1, 2013 at 19:58
  • Sam you got the question in correct way, I am downloading the document from internet but before downloading, I am sending document in word form and then downloading it in pdf/tex/doc. type(depends). Now the new document I got having links and I need to validate that links with original document
    – Reya
    Nov 4, 2013 at 15:39

1 Answer 1

1

This is how I approached a similar situation in validating a PDF creation service.

  1. Convert the doc -> PDF using an automated method you control. This will be your oracle.
  2. Use your conversion process under test
  3. 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.