Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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

share|improve this question
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 '13 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 –  Tami Nov 4 '13 at 15:39
add comment

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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