what is mercury.clipboard in qtp.where we can get this in
qtp tool i.e tabs
Answer Posted / 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 |
Post New Answer View All Answers
What is quicktest professional window?
what is error and fault in terms of software quality?
I want to configure the OR and library files to a particular QTP test during run time. Note: OR and Library files are located in Quality Center. Is it possible in QTP? Anybody having code?
in a web page How to check and display a particular word from a paragraph?
what are the limitations of smart identification in qtp 9.0
How to get popup error message.
can u explain the keyword driven framework with an example clearly how to create all the files and how to attach to main test.
How to automate a script in mainframes environment? I have the terminal emulator Add in. Describe in detail.
By using QTP can we record any log files written by the application which is in execution?
what could go wrong with test automation?
Explain how qtp identifies objects?
Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?
How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet
What are the features and benefits of quick test pro (qtp 8.0)?
Whats the realtime QTP testing process