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

Explain measuring transaction.

0 Answers  


What is quick test pro? What is a quick test professional?

0 Answers  


whenever U using QTP,Test Director, Why we using separate Bug tracking tool?

0 Answers  


what are recovery management techiniques?

2 Answers   BirlaSoft, GL Noble Denton,


how to write xml output check point bu useing descriptive programing .means without useing output check point

0 Answers  


Hi All, I am a beginner in QTP and have understood the basics of QTP by going through tutorial. I am trying to Automate a HRMIS application, What is the right approach to Automate this application. Kindly answer. Thanks in advance

1 Answers  


Please can you give where can we get good QTP Training at Hi-Tech city Hyderabad?

10 Answers  


why you have standardized functions? plzzz guys with real time exp. do answer

0 Answers  


how to pass parameters from one action to another using output parameters I am not calling action 2 from action 1, they are being called individually I need syntax please .. Requirement: Action 1 customer = Browser(" ").Page(" ").Link(" ").GetROProperty("value") I want to use the value stored in customer in Action 2 I do not want to use any of these actions as re-usable actions

2 Answers  


how would you go for testing a web application like any jobsite?(using manual n qtp)..pls frnds its very urgent ..i need realtime answers...thanks in advance

2 Answers   Wipro,


hw to create a frame work in qtp..what are the basic steps

2 Answers   Infosys,


Hi guys i'm prepareing for interview question for qtp i don't have bayground for vb scipt language can any one tell me it is easy to do job in qtp without bayground.

3 Answers  


Categories