Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 are the different recording modes and how do they work?

0 Answers  


whenever U using QTP,Test Director, Why we using separate Bug tracking tool?

1 Answers  


how to idetfy which test cases are automated?who will deside that plz tell me

0 Answers  


Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why?

1 Answers   Crea,


How will you test a keyboard?

0 Answers  


In QTP how to interact tool and application build?

2 Answers  


How many actions we can write in a test?

7 Answers   TCS,


When and why to use descriptive programming?

0 Answers  


Why divide a test into three action calls?

1 Answers  


How do you do batch testing in QTP, if so explain?

2 Answers  


write a qtp script to see time in windows command prompt? its urgent....

9 Answers   BSL,


Explain the types of object repositorys in qtp?

0 Answers  


Categories