In our application (Web based application)we will get a pdf
file and we have check a particular text in that pdf. Can
any one tell how to check text in a pdf file.
In the same pdf file it generating some links and I have to
click that links. QTP unable recognizing that links, even
id did record and playback qtp does not generating any
script.
Can any one help me….?
Answer Posted / nanda
Hi...we should have add in for it. but with add in also we
do it..by copieng pdf test to a text file.
for this...
string1 = "nanda"
len_data = len(string1)
i=0
file_path = "C:\Documents and Settings\Madhu
Sudhan\Desktop\pdftotext.text"
Set clipboard = createobject("mercury.clipboard")
Set fso = createobject("scripting.filesystemobject")
Set notepad = fso.createtextfile(file_path,8)
'*********Start recording click on Edit menu--select all,
'click on Edit menu--copy, click on pdf file to get deselect
'the text...************
Window("Adobe Reader").Activate
Window("Adobe Reader").WinMenu("Menu").Select "Edit;<Item 8>"
Window("Adobe Reader").WinMenu("Menu").Select "Edit;<Item 4>"
Window("Adobe Reader").Activate
get_text = clipboard.gettext
notepad.write get_text
notepad.close
set notepad = fso.opentextfile(file_path,1)
do while notepad.AtEndofStream <> true
get_data = notepad.readline
search_data = instr(get_data, "nanda")
capture_data = mid(get_data,search_data,len_data))
if capture_data = string1 then
i = i+1
else
end if
loop
msgbox "the text is found in "& i" rows"
for any queries...
nanda.dreddy@gmail.com
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
what is the difference between rational rose and QTP? WHICH TOOL IS BETTER TO LEARN? PLEASE SEND ME AT sana_50218@yahoo.com sandeep@epuratech.com
How will you report the bug and explain the defect tracking sheet you handled?
requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich" you must get the text in combo box and need to compare them how
How do you open adobe acrobat file in QTP and do some testing on that file ?
Can any one send me the QTP Basic Coding Samples?
how to write the descriptive programming in QTP for remove the object value and substitute, with a variable then call the validation from excel
What environment does qtp run in?
What is checkpoints for qtp?
Explain how you can replace string in qtp?
How many types of trigger events are there in qtp?
Is it possible to change the property value at runtime? How it is possible?
banking domain description for software tester for interview
how to convert 100 into hundred repees only and viceversa
explain structured testing? plz guys with exp. do answer
What is quicktest professional (qtp window?