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
For which type of project the iterative model is suitable?
Can any one brief some detail on how the shared and action object repository utilized/implemented in a real time project. I already know how to make shared object repositor by saving OR as .tsr extension..I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thanks
How to Test the mainframe application?
How you calling actions in qtp?
How to explain a banking project in interview as a test engineer???
What is a Patch in QTP?
In an interview, what r the general questions asked in QTP? pls give me anwser to this question?
Hi All, issue is related to handling pop up script generated in IE, and run on mozilla. In App Under Test, when we get the alert pop ups, we just click ok button. if we need to run the same code on mozilla it will not identify . so we will check browser if browser(*).dialog(IE object).exits browser(*).dialog(IE object).winbutton(OK).click else 'by default mozilla browser(*).dialog(mozilla object).page(*).webbutton(OK).CLICK END IF But my qustion is. Do we write the above piece of code where ever we get such kind of pop ups from the application like alert pop up, confirmation pop up.... OR do we have any other alternative way to do this by using any functions in Recovery Scebarios? If Any of u know idea please do help me in this regard. or send answer to kravimb@gmail.com
What is different command used in command Prompt while using QTP?
How to use actions in qtp ?
How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?
What is the use of text output value in quicktest professional (qtp)?
Create flight reservation login descriptive programing (Condition: Remove the value and substitute with a variable, and then call the validation from Excel) Plz help me....... very urgent.........
in a web page hoe to check the dynamic links that rechabging with out using regular expressions
what is meant by function library?Public and private functions in function library? if private functions are applicable for only for the particular test means then y we have to add those to function library?