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

please clarify the question ................. i know how to open the notepad file ? but i don't know how to enter the data into opened notepad ? Ex: set a=createobject("wscript.shell") a.run "Notepad.exe" please give the replay. my mail id is raju.ippali@gmial.com, 9823257761

6 Answers  


how can we merge the object repositories?is ther any option in qtp to merge the object repositories if we have two or three object repositories?

6 Answers   IBM,


We have a dynamic webtable where rows keep on adding.I have to click on particular row where the status changes to Update or Save.How do you click on Status(either it can be Update or save)

2 Answers   IBM, Infosys,


I have the script like this: Browser("Login").Page ("Application").Frame("ScopeFrame").Link("DC3701737 (Active)").Click in which the value "DC3701737" will get changed and i have to use the same value in so many places. I got the value "DC3701737" in to a variable(Say x). Now if i want to pass the variable in to link object .. how? Browser("Login").Page("Application").Frame ("ScopeFrame").Link(x).Click Is it possible to pass any variable into a link object .. so, that the application will select that link automatically? If ur not able to understand, pls let me know.

2 Answers   ABC,


What are "Ordinal Identifiers" and where it is used in QTP. AS FAR AS i KNOW, its is used to identify the object. but i want clarity regarding this.

2 Answers  






wht is Driver in Integration testing. Anubody can answers it

7 Answers   CTS,


Is it possible to merge two object repository files in qtp?

0 Answers  


Take a situation when you are working with QTP, suddenly system has crashed.so you again start the system. My questyion is how can QTP directly opened when the system desktop appears.

1 Answers  


Hi this is chandra if any one have Navigation of LAB QTP, I want Navigation of those tools, if any one have the and know the Navigation each and every part of the QTP, plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com

0 Answers   Ordain Solutions,


what is difference between application testing and product testing?

5 Answers   IBM,


how to open Excel sheet & write in it & save it?

1 Answers   InTech,


difference between GetRoProperry and GetToProperty.and where we've to use exactly those properties

5 Answers   Wipro,


Categories