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 / 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 |
which is the easiest way you can send the QTP test results to Client if he want to see the screenshots when the results are failed?
What are the types of object repositories? Which one is you using?
How exactly you start scripting in QTP? In the interview he was not satisfied with my answer.Please post what is correct answer.
Give the syntax to load function at run time.
suppose i can done the project in automation tool with QTP in that time what i can say?
How can we use the "CreateObject ("Scripting.FileSystemObject")" in QTP and what is the definition and purpose of it?
How many function you use in your application?
How can I pass values from one action to another in QTP ?
What is difference in global and action sheet in qtp?
For an application we automated QTP scripts. At the same time new requirement comes for a new module for the same application and its already developed. So how we automated now this new module with the old application(using old QTP script).
hi nani my doubt is how does qtp process metrix related to software process.
how can i sent QTP results to the Html, notefile ,xl file give me the code using g mail login page