what is mercury.clipboard in qtp.where we can get this in
qtp tool i.e tabs



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

Post New Answer

More QTP Interview Questions

Why we use QTP ,We can use other tools like WR OrSilktest What r the options in Qtp that WR and Swilktest Does not have.

0 Answers   Hewitt,


Hi PLZ explain User Defined Functions in QTP with eample?

2 Answers   Ordain Solutions,


Explain the difference between check point and output value?

0 Answers  


UFT 12.02 which ALM version will support

0 Answers  


how to create user defined functions in QTP? can any one expalin me with example.. Thanks in Advance for help

4 Answers  






What is the meaning Work bench?

0 Answers  


What is the entry and exit point of automation testing

2 Answers   Infosys,


Can u call winRunner scripts from QTP?

4 Answers  


What is a reusable action?

0 Answers  


Hi..friends can anybody write the script for this question... Am having some 20 nos of links in a web application, i want to click some 5,13 & 17th links. So please....can anybody give the answer....??? -->Hani<--

4 Answers  


What is Performance testing?

2 Answers   Crea,


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

0 Answers   FIS,


Categories