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

What is the architecture of framework

0 Answers  


Hi Friends, I'm new to QTP. I want to write a function in QTP for below senario. In an Excel sheet column B, I Have 10 Url/Links, and in Colum A there is a Flag as Y and N. My test should run only on those iterations which are flagged as Y. Please help, Thanks

6 Answers  


How many types of recording modes in qtp? Which will be used when?

0 Answers  


How to find which type of Framework is suitable for which type of application?

4 Answers   CTS,


what area in a web application cannot be automated.

1 Answers  






How can i test an application like Google Earth.In my application data will be fetched from a oracle database based upon which graphs are generated..so these all are dynamic..how can i use qtp here..alongwith that how can i test the map generated by a satellite just like google earth..

0 Answers  


how to export the result to notepad....for example i want to enter the user name and pass word and clicking on login button ......once you click on login button the corresponding page will open ...in that page you having one list box ...here you can get either success or failure ........friends here i want export the message what ever i got either success or failure .....how to export the result to note pad

1 Answers   Mind Tree,


how we implement share object repository in QTP 9.0 without using quality Centre , Explaine in brief

0 Answers   HCL,


How to create an Action Template?

1 Answers  


What is Associate Repository in QTP 9.2 ?

0 Answers  


object types is used for what?

1 Answers  


Hi, i want download attached files in test plan area from QC to local drive in my system using QTP script. Please help me

3 Answers  


Categories