How to compare 2 excel files using QTP?
How to compare 2 PDF files using QTP?
Answer / srihari j
How to compare 2 PDF files using QTP?
Dim varPath1, varPath2, str1, str2
varPath1 = "C:first.pdf"
varPath2 = "C:second.pdf"
str1= getPDFText (varPath1)
str2= getPDFText (varPath2)
if StrComp(str1,str2,0) <> 0 Then
msgbox "PDF files do not have same text content"
else
msgbox "PDF files have same text content"
end If
Public Function getPDFText (varPath)
Dim MyClipboard
SystemUtil.Run varPath
Window("regexpwndtitle:=Adobe Reader","regexpwndclass:=AdobeAcrobat").Type micAltDwn + "t" + micAltUp
Window("regexpwndtitle:=Adobe Reader","regexpwndclass:=AdobeAcrobat").Type "s"
Window("regexpwndtitle:=Adobe Reader","regexpwndclass:=AdobeAcrobat").Type micDwn
Window("regexpwndtitle:=Adobe Reader","regexpwndclass:=AdobeAcrobat").Type "Enter"
Window("regexpwndtitle:=Adobe Reader","regexpwndclass:=AdobeAcrobat").Type micCtrlDwn + "a" + micCtrlUp
Window("regexpwndtitle:=Adobe Reader","regexpwndclass:=AdobeAcrobat").Type micCtrlDwn + "c" + micCtrlUp
Set MyClipboard = CreateObject("Mercury.Clipboard")
getPDFText = MyClipboard.GetText
MyClipboard.Clear
Set MyClipboard=Nothing
Window("regexpwndtitle:=Adobe Reader","regexpwndclass:=AdobeAcrobat").Activate
Window("regexpwndtitle:=Adobe Reader","regexpwndclass:=AdobeAcrobat").Close
End Function
Is This Answer Correct ? | 0 Yes | 0 No |
Define Canvas view of UFT?
Can you expect major bugs in Net banking Application?
what is the difference between modular framework & datadriven framework
can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?
how qtp handles customised object
how we do database testing with qtp using descriptive programming?
22 Answers Nutrins, Rohit Technologies, Symphony, Syntel, TCS,
what is the difference between quality and testing ?
write is the code for regular expression in QTP
Explain in brief about the QTP Automation Object Model.
wht is Manual Testing Frame work. Pls anybody can give appropriate answers
How to invoke QTP using Dos prompt ?
Dear Friends, I having total 3+year experience in manual testing including automation testing QTP, if i am attending any interview what kind of question will i get? please help me out