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 |
why do we use both location and index identifier.
Why qtp always start action1 and does not start action?
can we run the scripts of QTP8.2 in QTP7.0?
What is throw object?
IF we use batch testing.the result shown for last action only.in that how can i get result for every action.
There are two tabs in the application suppose, A and B.On clicking the tab "A" one table grid will open. if u click on tab "B" Another table gride will open. Now can I do some operations on both table grids with a single table grid properties in the object repository? I have added all objects of the first table grid into the object repository Now iam checking enable/disable status of "save button" in the second table grid my code is like this val=javawindow("zseries").javabutton("save").getroproperty ("enabled") when I highlighting the save button in the object repository by keeping open the second tablegrid on the application.It is displaying the popup message"The selected object can not be found in the application" can I use properties of one table grid for both tabs if so how it is possible. Can anyone help me
What is the Difference Between Quick Test Pro and Quick test professional?
How to create log file in qtp?
How can you find Local Host Name by Using QTP?
Reverse a string keeping the words in the string as it is. E.G. "Quick Test Professional" O/P "Professional Test Quick"
how do u handle an object without name using QTP 9.2?
How we can call the scripit from another scripit in QTP?,Not a call Action