what is mercury.clipboard in qtp.where we can get this in
qtp tool i.e tabs
Answer / nanda
HI,
"mercury.clipboard" is method to create a clipboard
object. and use to copy and paste the text.
The below Example will copy the text from PDF file to
notepad file:
note : the given files paths are in my local system. Please
give paths in ur local system.
Set clipboard = createobject("mercury.clipboard")
'Give notepad file path according to ur local system path.
filepath = "C:\Documents and Settings\Madhu
Sudhan\Desktop\example.txt"
for_reading = 1
for_appending = 8
'Please Open any pdf file in ur system. at the time of
running it should be opened and in maximize.
Window("Adobe Reader").WinMenu("Menu").Select "Edit;<Item 8>"
Window("Adobe Reader").WinMenu("Menu").Select "Edit;<Item 4>"
Set fso = createobject("scripting.filesystemobject")
Set notepad = fso.createtextfile(filepath,for_appending)
nanda = clipboard.gettext
notepad.write nanda
notepad.close
Set notepad = fso.opentextfile(filepath,for_reading)
reading=notepad.readall
msgbox reading
With Regards..
Nanda
| Is This Answer Correct ? | 5 Yes | 0 No |
What are the different recording modes and how do they work?
whenever U using QTP,Test Director, Why we using separate Bug tracking tool?
how to idetfy which test cases are automated?who will deside that plz tell me
Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why?
How will you test a keyboard?
In QTP how to interact tool and application build?
How many actions we can write in a test?
When and why to use descriptive programming?
Why divide a test into three action calls?
How do you do batch testing in QTP, if so explain?
write a qtp script to see time in windows command prompt? its urgent....
Explain the types of object repositorys in qtp?