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

How to modify the text checkpoint?

0 Answers  


Give a comment on Regular Expressions using QTP?

4 Answers  


Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers

0 Answers  


what is exit and entry criteria of automation testing. any body wants a real time script,please mail to me. contactno;9986435766

2 Answers  


How to run a test using quicktest professional (qtp)?

0 Answers  






what is Compile Module in QTP? what exactly it contains Functions or Actions?

1 Answers  


What we are looking for is to load properties of object dynamically as for our application the global repository will pretty huge. It will be really helpful to us if something similar to following functions of Winrunner is available in QTP. #Define descriptor auto strDesc; #set property in the descriptor Gui_desc_set_attr(strDesc,?Class?,?Edit?); --- put other properties #Add Edit box to GUI Map Gui_add(? ?,strWindowName,strEditboxName,strDesc);

0 Answers  


I need your help in the below topic using QTP Automation tool. How to automate the right click of mouse on a context menu? 1)Tried low level recording which is working fine but making use of co-ordinates. 2) Also tried changing the mouse settings and properties using Tools ->WebEvent RecordingConfiguration and created a configuration file with required mouse click events and used which did not work.

1 Answers   AppLabs,


What are SetToProperty, SetRoProperty, GetToProperty scripting?

4 Answers  


If you giving priority as p0, as a developer if I give priority as p2, What happens In user defined function ?

0 Answers  


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))

0 Answers  


HI ALL I AM WORKING AS A AUTOMATION ENGINEER FROM PAST 2 MONTHS IN QTP,MY QUESTION IS IF I OPEN THE BROWSER FIRST & THEN THE QTP LATER MY OBJECT SPY WILL NOT WORK,Y IT IS SO..IF U HAVE THE ANSWER PLZ MAIL ME AT AKSHAR.MYSORE@GMAIL.COM

8 Answers   Infosys, TCS,


Categories