Hi Everybody,
Can anybody please tell me the how to display the result of
the QTP in the notepad text file rather than in the QTP
result window.
Suppose this is my simple script:WHich will open the
notepad file and enter some text and then will change the
font then will calculate how much time has been taken.Now,
in this script i want to display the result in notepad file.
Dim s
Dim starttimer,endtimer,timeit
s="uyetuywqtywqte"
SystemUtil.Run "notepad","","Y:\",""
Window("Notepad").WinEditor("Edit").Type micCtrlDwn + "s" +
micCtrlUp
Window("Notepad").Dialog("Save As").WinEdit("File
name:").Set "test1"
Window("Notepad").Dialog("Save As").WinEdit("File
name:").Type micReturn
Window("Notepad_3").Type s
Window("Notepad_3").WinEditor("Edit").Type micCtrlDwn + "s"
+ micCtrlUp
starttimer=timer
Window("Notepad_3").WinMenu("Menu").Select "Format;Font..."
Window("Notepad_3").Dialog("Font").WinEdit
("Font:").Type "cou" + micDwn
Window("Notepad_3").Dialog("Font").WinComboBox
("Font:").Select "Courier"
Window("Notepad_3").Dialog("Font").WinEdit
("Font:").Set "Courier"
Window("Notepad_3").Dialog("Font").WinEdit("Font:").Type
micReturn
endtimer=timer
timeit=endtimer-starttimer
print(timeit)
Please also tell me where the function for the text file
result will be declared and where it should be called.
Thanks,
Gaytri
Answer Posted / gaytri
Hi Chaitu,
Actually what I want to do is : I want to display the
result of my script in the notepad text file rather than in
the test result window, as it is usually displayed.here I
had given one example of my script. You can take any
example.
I think for this we have to create one function, but this
is not clear to me where to call that function and what
will be the definition of the function.
Please let me know if still it is not clear to you.
Thanks,
Gaytri
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
hi all can anyone explain how to write the code for finding the mandatory columns in table which are having (red*) (red Astrik)
How to remove associated function library?
what is the difference btn risks & Therads in the Test plan documentation?
How to delete an object from the object repository?
I want to do QTP Certification what is the pattern of Question paper.
How to find the length of the string in qtp?
Is the qtp course will help to create a virtual object?
Can launch two instances of qtp on the same machine?
Can we create a qtp test from qc?
Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.
What is difference in global and action sheet in qtp?
What is the standard timing delay for web based application in qtp?
What is the difference between the keyword view and expert view?
How we can import data from database?
Did QTP prove efficient for your project? Yes or No, explain?