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 |
I wanted to create Data Driven test for login page (loginname,password). Password is same for all the loginnames. I recorded the script for one user. I mentioned all the user names in the global excel sheet with the column name as "Loginname". I mentioned 5 loginnames. I selected tools- >datadriver and select loginname. Select parameterize and select parameter all option.Changed the parameter name to "loginname" which i mentioned in the global excel sheet. I executed the script. For the users 2 and 4 only, the script is failing... can anybody explain why the script is failing for users 2 and 4.
Username field having some string mistake like"user naem".what type of testing i prefer to test spell check.
distinguish between old version and new version QTP features.
Connect to QC using AOM.
is qtp 9.2 create the scripts with the application run on mozilla firefox browser?
How can i use Ordinal identifiers and Smart identification methods suppose i want to know the index no of check box
Write the Test Cases for ATM(Any Time Money)
There are some links on the web page,write a script to count and click those links and check the text on the page displayed on clicking the links.
How to test login module with different username and password by using data driven testing in QTP?
In an interview, what r the general questions asked in QTP? pls give me anwser to this question?
write progamming connecting QTP to database sql? this is question asked by interview? pls any answer this?
How we can add actions in the test using QTP?