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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
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
Explain about opening notepad in QTP and writing of test 
result in notepad?
 Question Submitted By :: Padmasekharpediredla
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Explain about opening notepad in QTP and writing of test result in notepad?
Answer
# 1
systemutil.Run("C:\WINDOWS\NOTEPAD.exe")
Window("Notepad").WinEditor("Edit").Type "Hi This is shyam "
Window("Notepad").WinEditor("Edit").Type micCtrlDwn + "s" + 
micCtrlUp
Window("Notepad").Dialog("Save As").WinEdit("File 
name:").Set "demo"
Window("Notepad").Dialog("Save As").WinButton("Save").Click




'..........Any more question mail me 
testingwithshyam@gmail.com
 
Is This Answer Correct ?    3 Yes 0 No
Shyam.meghansh
[Hydus Technologies (INIDA) Pvt Ltd]
 
  Re: Explain about opening notepad in QTP and writing of test result in notepad?
Answer
# 2
In qtp directly we con't open notepad.so,create an object 
first(fso),through this obj we can access notepad.
 to create an obj
        set fso =create object(scripting.filesystem object)
        set x= fso.opentextfile()
 
Is This Answer Correct ?    1 Yes 0 No
Narendrababu
 
 
 
  Re: Explain about opening notepad in QTP and writing of test result in notepad?
Answer
# 3
set fso = createobject("scripting.filesytemobject")

file_path = "c:\ajreddy.txt"

set notepad = fso.createtextfile(file_path,forwriting)
notepad.writeline "hi ajreddy"
notepad.writeline "this is created on "& now
notepad.close

set notepad = fso.opentextfile(file_path,forreading)
for notepad.atendofstream
n = notepad.readline
msgbox n
Next
 
Is This Answer Correct ?    2 Yes 0 No
Ajreddy
 
  Re: Explain about opening notepad in QTP and writing of test result in notepad?
Answer
# 4
Hi 
The above ans will error message at for loop.
This will work fine.
Dim fso,notepad
set fso = createobject("scripting.filesystemobject")

file_path = "c:\nandu.txt"
'forwriting =2
'forreading = 1
set notepad = fso.createtextfile(file_path,1)
notepad.writeline "this is created by Nanda"
notepad.writeline"this is created on "
 
set notepad = fso.opentextfile(file_path,1)
Do
	n = notepad.readline
	msgbox n

Loop until ( notepad.atendofstream=true)


Thank you
Sailaja
 
Is This Answer Correct ?    5 Yes 0 No
Sailaja
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
wat are views in qtp explain IGT2
what is recovery scenario in QTP? what is the need of the recovery scenario in QTP? what are the advantages of the recovery scenarios in QTP? CTS3
This is Ajay i have few douts if anybody know pls give me reply. 1. i have opend 2 gmails i am working with 1 gmail i want to close other gmail by usig script. 2.i have 10 links in a page all of them have same properties& names i want to click on 5link by using script. 3.i have one combobox in that i want to see all the citynames in the combobox and i have to check weather hyderabad is present or not. 4. size of objectrepository. 5.what r problems we get during writing the script. 6.is it possible to compare to excel sheets in qtp if possible wht is the script. 7.example for lowlevelrecording Symantic-Space2
How to Test the mainframe application?(tell me few basic things) Covansys1
what is the abbrivation of .mtr in action reposirtory? GE5
how to get childobject from .net application. i tried but its showing child object count zero. but window has child objects.the following script i written... pls help me how to get. set parent=SwfWindow("winodw name") CheckObjectDescription parent, SwfButton Public Function CheckObjectDescription(parent, oDesc) Set oDesc = Description.Create() oDesc("micClass:").Value ="Swfbutton" Set children = parent.ChildObjects(oDesc) cntObj=children.count msgbox(cntObj) End function  1
Can u Reduce the size of Object repository? What are the problems u have faced in Qtp tool? IncRev2
how we do database testing with qtp using descriptive programming? Nutrins8
Difference between keyword driven test and DDT?  1
In how may ways we can use checkpoints to an application using QTP?  2
Few basic questions on commonly used Excel VBA functions.  1
How u perform exception handling in QTp,what is other name for ths Lehman-Brothers1
can anybody give me the links for vb script material  1
what is the syntax for regular expression in QTP? how to create user defined functions in QTP? MBT4
After coming to know that QTP could not identify non-standard objects, we set those non-standard objects as virtual objects using Virtual object wizard. But how can we identify that qtp could not identify non-standard objects?  6
How can we write script for a .net application in QTP? Can we use VB Script for .net application.  1
in a database table there are 3 columns (name , marks,grade) , in application after retrieving data from db to fields name, marks click ok button then grade should displayed ---for this how to write vb script prgm IBM3
Why u don’t like recording the script and writing the script Wipro3
LINUX environment supports QTP or not? LINUX environment supports QC or not?  2
what is the recovery scenario?  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