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...


Explain about opening notepad in QTP and writing of test
result in notepad?

Answers were Sorted based on User's Feedback



Explain about opening notepad in QTP and writing of test result in notepad?..

Answer / sailaja

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 ?    14 Yes 2 No

Explain about opening notepad in QTP and writing of test result in notepad?..

Answer / shyam.meghansh

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 ?    10 Yes 1 No

Explain about opening notepad in QTP and writing of test result in notepad?..

Answer / ajreddy

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 ?    3 Yes 2 No

Explain about opening notepad in QTP and writing of test result in notepad?..

Answer / narendrababu

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 ?    3 Yes 5 No

Post New Answer

More QTP Interview Questions

When you are running a batch test of 5 scripts and in 2nd script appln crashed, what hpns then?

4 Answers   BirlaSoft,


when i perametarization of the test through outputcheckpoint,i have seen run time error i.e outputcheckpoint mismatch .Plz tell anybody to me(qtp).How to clear that?

1 Answers  


Does QTP recognize two diff browser's at a time..?if possible how..? Is it possible run scripts on Mozilla which are recorded on IE..?..How..?

12 Answers   IBM, Semantic Space, TCS,


what is the difference between modular framework & datadriven framework

0 Answers   SDS,


How to find duplicates in an array and remove them efficiently?

2 Answers  


WHO TAKE DECISION TO RELEASE THE BUILD

2 Answers   IGT,


Diff b/w test scenario's and test Procedures?

0 Answers  


How many types of Parameters are available in QTP?

1 Answers  


How you can find length of array in qtp?

0 Answers  


What is the Command used to start the QTP

0 Answers   HCL,


When we try to use test run option "Run from Step", the browser is not launching automatically why?

1 Answers  


hi everyone today is the first time i saw this website,and hi iam siraj,iam very impressed by seeing evryones response towards questions,iam a newcomer and i have got tryining in testing can anyone please send me some projects relaited to testing.i know it is very confidential but still if u send it will a great help. my mail id venku_krs@yahoo.co.in

1 Answers  


Categories