ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
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
 Question Submitted By :: Gaytrisareen
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
Hi
Gayatri

Your questions Good,But This is not clear,try to send 
clearly.i will be try to answer the question

Ok 
Bye
Chaitu.C
 
Is This Answer Correct ?    0 Yes 0 No
Chaitu.c
 
  Re: 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
# 2
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
Gaytri
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
Suppose u write test case in Excel sheet . how u open that test case in Test Director? Ordain-Solutions3
What is the diffrence bettween QTP 9.0 and QTP 9.1?  1
When The Low Level Recording is Used in QTP  14
Can we set a timeout for the msgbox.I want the msgbox to disappear after 2 seconds during the script execution without clicking on the OK button manually.  4
What are associated files in QTP?  2
what is memory leakage? ITC-Infotech10
How i can use Regular expression in QTP?give detailed steps for it.  2
what is Action conversion tool? what the Action conversion tool will do? Satyam1
How can I test the unix shell in QTP Persistent1
Can Any One Write How to Write the Script for Child Objects  2
what type of scripts are asked in qtp?  2
How to Test the mainframe application?(tell me few basic things) Covansys1
plz anybody tell me how to explain the architecture of one particular project.plz give me answer for this.....RAJESH TCS6
does qtp need record and playback in realtime. plz tell exactly wat happens HP3
how to get font size of a "WebEdit" L&T3
What is the extension of script and object repositary files?  2
what is frame work of qtp? ITC-Infotech3
How to make an Action as reusable?  1
hi how could i get installation guide for QTP 9.0 on XP help me for this !!!!!  1
how do pass parameters from one action to another action  1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com