How to match two doc files using qtp
requirment is:- each and every single word of a doc file
should be matched with the another doc file. can someone
send me the code.
Answer Posted / kavitapriya cr
Use the script below:
Dim fso,FileName1,FileName2,File1,File2
Set wrdApp=CreateObject("Word.Application")
Set FileName1=wrdApp.Documents.Open("Path\FileName1.doc")
Set FileName2=wrdApp.Documents.Open("Path\FileName2.doc")
Set File1=fso.GetFile(FileName1).OpenAsTextStream(1,0)
Set File2=fso.GetFile(FileName2).OpenAsTextStream(1,0)
CompareFile=True
Do While File1.AtEndOsStream=False
String1=File1.Read(1000)
String2=File2.Read(1000)
If StrComp(String1,String2<>0) Then
CompareFile=False
Exit Do
End If
Loop
If CompareFile=True Then
MsgBox "Files are matching"
else
MsgBox "Files are not matching"
End If
File1.Close
File2.Close
FileName1.Close
FileName2.Close
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
I want to do QTP Certification what is the pattern of Question paper.
assume i have few url link how will i dynamically call then using descriptive programming?
What is the framework your company is following. What is the reason. Explain why key word driven frame work is chosen.
Can we write winrunner language i.e TSL in QTP tool?
How to use descriptive programming?
Explain different types of action in qtp?
hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....
Where to use Property Let, Property Get, Property Set in UFT
What test cases can you automate using QTP?
How can you identify the browser and its information using the qtp script?
i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?
wht is Manual Testing Frame work. Pls anybody can give appropriate answers
1.Qtp suppots Unix& linx or not 2why qtp suppots shell script.
How to perform cross platform testing and cross browser testing using qtp? Can you explain giving some example?
How would you directly trigger javascript in a test?