How can you Open a Notepad and How can you write the test
Resuts in Notepad by Using QTP?

Answers were Sorted based on User's Feedback



How can you Open a Notepad and How can you write the test Resuts in Notepad by Using QTP?..

Answer / sushma

Result = "The test is passed"
Set a=createobject("Scripting.filesystemobject")
Set b=a.opentextfile("E:\raju\1.txt",2)
b.writeLine Result
b.close
Set a = Nothing
Set b = Nothing

Is This Answer Correct ?    7 Yes 2 No

How can you Open a Notepad and How can you write the test Resuts in Notepad by Using QTP?..

Answer / kavitha

dim fso,f,x,y

Set fso=createobject("Scripting.filesystemobject")
Set f=fso.opentextfile("path of the file",1/2/8) {1-reading
mode, 2-writing mode, 8- read and write mode }
While f.atendofline<>true
x=f.readline 'it reads the value

In notepad file u have to put the data and attached to this
program to run the file morethan one time.

Is This Answer Correct ?    3 Yes 1 No

How can you Open a Notepad and How can you write the test Resuts in Notepad by Using QTP?..

Answer / king

Set a=createobject("Scripting.filesystemobject")
Set b=a.opentextfile("E:\raju\1.txt",2) {1-reading mode, 2-
writing mode, 8- appending mode }
While b.atendofline<>true
y=b.readline ---- Read the line on particular
mentioned fine

b.writeline "I Love QTP" --- write the line on particular
mentioned file

Wend


i think it's working proerly, if u have any quarries plz
let me know
raju.gudla@gmail.com
9823257761

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More QTP Interview Questions

An object is non standard object, i mapped it to standard object, eventhogh on mapping to standard object i cannot use the methods available on the standard object with the mapped object. How i can use those standard object methods with these mapped object. (((Note : dont tell that we can use virtual object as virtual object is to map nonstandard obj to standard obj)))

0 Answers   HCL,


I am trying to install QTP 9.5 but i am getting error message saying that ("Path is \QuickTest Professional\bin\vb_init.exe") vb_init.exe file is not find. can anybody give me the advise what to do ?

0 Answers  


How to use Regular Expressions in QTP

1 Answers  


A FORM CONTAINS 5 FIELDS. 1 FIELD IS ENABLED REMAINING(4) FIELDS DISABLED. MY QUESTION IS ENTER VALUES INTO 1 FIELD AFTER THAT CLICK TAB BUTTON THEN 2 FIELD ENABLE THIS PROCESS CONTINUE UPTO 5TH FIELD. HOW TO WRITE CODE IN DESCRIPTIVE PROGRAMMING. PLZ TELL ME THE PROCEDURE AND CODE FOR IT.

0 Answers   TCS,


what is smart identification in qtp? pls any give details? thanks in advance

3 Answers   IBM,






Explain Descriptive Programming Types with Examples?

0 Answers  


Can we do Load Testing with QTP?

4 Answers  


what is parameterisation?

3 Answers  


Is it possible to switch between recording modes during a test creation?

0 Answers  


Explain the terms test and business component?

0 Answers  


what is output parameters in qtp?explain? 2)

2 Answers   Span Infotech, TCS,


what are the main differences between keyword driven frame work and data driven frame work?

1 Answers   UHG,


Categories